Programming Confessions Thread



  • I've done it in Java as well, and C++.


  • Discourse touched me in a no-no place

    @ben_lubar said:

    I've done it in Java as well, and C++.

    But it's a fairly common and unremarkable things--it's a mistake, not something you'd confess. So I have to assume the confession is that you use Go.


  • Grade A Premium Asshole

    I actually like Jira, and after checking out Rails again for the first time in years, I think it is growing on me.



  • @mott555 said:

    I write (and enjoy!!) PHP stuff in my spare time because it's more interesting than my day job.

    Same here, except Python, not PHP.



  • @ScholRLEA said:

    Sorry, I guess you missed an earlier post of mine; I was referring to SalesForce.com Apex, a proprietary language which is superficially like Java but is in actuality a hobbled, mangled example of vendor lock-in at its worst. It runs solely as a cloud-based extension of SalesForce, and is 'optimized' (if that is the right word) for working with the bizarre structure of that particular CRM. It is mostly used for server-side 'controllers' operating on an HTML derived markup language called VisualForce, which shares with Apex some of the worst excesses of proprietary design since IBM in its heyday. SFDC manage to make Microsoft and Oracle look good, despite the fact that they don't have anywhere the influence those two do.

    I normally don't mind proprietary systems per se, but this one is littered with bad design decisions which were clearly made for the sole purpose of making the customers entirely dependent on their services.

    It wouldn't be half as bad if the documentation was up to snuff, but in yet another business-driven decision, they deliberately made the docs hard to follow without having going through their specific indoctrination about terminology and methodology. They turn generally accepted terms on their heads in ways even Steve Ballmer would consider unethical, they are deliberately inconsistent in the names and descriptions of parts of their system, and the only way to make sense out of it all is to hire a team of 'experts' from them to act as native guides. Given the lack of skill some of these consultants show, I think I'd rather be lost.

    Filed Under: Don't hold back, Schol, tell them how you really feel...

    Have you had the primitive/non-primitive passing by value/reference fun yet?



  • @blakeyrat said:

    ReSharper

    Compared to VS2012, Resharper's Find Usages seems way better than built-in one. Mostly though I like resharper because it reminds you of its features - sure, VS has a lot of refactoring capabilities, but is way worse at highlighting the points where it would be beneficial to use this.

    My confession - for the past week, I've been piling up hacks and inconsistencies upon a mountain of hacks and inconsistencies instead of properly refactoring the code. If they're gonna ask me to change just one more single line in this thing, it's gonna come down like a house of cards.

    Also, I claim to have 3 months of industry experience, which consists of about 2, maybe 3 weeks of actually writing code and definitely at least 2 months of fucking around on TDWTF. That might or might not be my fault, though.


    Filed under: also, I've drunk about 50 litres of free coffee during that time


  • :belt_onion:

    @Maciejasjmj said:

    Also, I claim to have 3 months of industry experience, which consists of about 2, maybe 3 weeks of actually writing code and definitely at least 2 months of fucking around on TDWTF. That might or might not be my fault, though.

    Beats listing it as 10 years of experience in a language where you only actually used it 1 time 10 years ago.



  • @dkf said:

    The OO equivalent is “ravioli code”. Lots of little parcels, but still that damn sauce on your shirt.

    Oh man, I'm stealing that.



  • @supposedlysmart said:

    n, I can tell you theoretically what it means, but give me an algorithm and I couldn't tell you how does it scale, or use any kind of scientific process to find a better implementation.

    I thought this until I had an interview recently and got it correct without much thinking. So maybe you don't have enough faith in yourself?



  • @lucas said:

    @supposedlysmart said:
    n, I can tell you theoretically what it means, but give me an algorithm and I couldn't tell you how does it scale, or use any kind of scientific process to find a better implementation.

    I thought this until I had an interview recently and got it correct without much thinking. So maybe you don't have enough faith in yourself?

    It isn't that hard, really. The basic logic behind it is based on how deeply nested your loops are, and the only other thing you need to remember for day to day work is that logs are synonymous with divide-and-conquer.


  • Discourse touched me in a no-no place

    @tarunik said:

    It isn't that hard, really. The basic logic behind it is based on how deeply nested your loops are, and the only other thing you need to remember for day to day work is that logs are synonymous with divide-and-conquer.

    You've also got exponentials, which are linked with “try every possibility”. You usually want to avoid them. ;-)



  • @dkf said:

    You've also got exponentials, which are linked with “try every possibility”. You usually want to avoid them.

    Well, "try every possibility" is synonymous with "insane" for non-trivial n, so if you ever see O(2^n) code, kill it with fire. (Or at least sharply bound the iteration count or incoming n, lest the code becomes a Denial of Service vuln.)


  • Discourse touched me in a no-no place

    @tarunik said:

    if you ever see O(2^n) code, kill it with fire

    Nice trick if you can do it. Some problems are really terrible, to the point where even getting down to O(2N) would be a big research challenge. I used to work with one (years ago) which was natively EXP2SPACE. 😦 It blew up so fast, even when we ran on (then brand-new) 8GB supercomputers…


  • Discourse touched me in a no-no place

    My confession: while building a ridiculously complex MineCraft structure, it occurred to me that it would be less tedious to write a program to edit the save file and programmatically create it.

    Not less work, mind. It would probably take more clock time...but it would be less tedious, because doing it in-game requires a LOT of placing blocks and then destroying them.



  • @dkf said:

    I used to work with one (years ago) which was natively EXP2SPACE.

    Bah; child's play. Try working somewhere where the problems are undecidable, like about 85% of what my current employer does. ;-)


  • Discourse touched me in a no-no place

    @EvanED said:

    Bah; child's play. Try working somewhere where the problems are undecidable, like about 85% of what my current employer does. ;-)

    Are you sure that's not just plain old indecisive?



  • @tarunik said:

    if you ever see O(2^n) code, kill it with fire.

    But will killing it with fire scale?



  • I'm guessing that being asked to solve undecidable propositions (e.g., ones which can never be proven nor a disproven) and not wanting to tell the boss that it can't be done without being able to explain why is leaving EvanED the indecisive one.

    Or maybe there is decisive solution: sending out resumes to other companies that don't demand the impossible on a daily basis. Assuming such companies exist.

    Well, maybe the next company will ask for something merely difficult, like proving Fermat's Last Theorem in the space of a book margin, or determining if P=NP is decidable or not (never mind proving whether or not they are in fact equal).



  • Confession: I rarely design my UI up front, at least not in the sense most people would say you should. I prefer to have four overall steps: first, design an API; then develop an underlying library; then write a shell program that tests that; then, as a completely separate program, I design a GUI application. The biggest problem is that, like most, I most often write the library first then force-fit it into some sort of API afterwards, which in it's own way is just as bad as writing the CLI without a plan and/or without considering whether a GUI can be glued on top of it later. I am at least trying to get this bad habit under control, but it isn't a easy discipline to hold to.

    I also have to admit that I rarely have the luxury of doing it this way, and even when I do, the UI for the CLI program is generally an afterthought - which sounds reasonable, as it is only for testing purposes, but test programs do have a way of sneaking into production.


  • FoxDev

    @tarunik said:

    so if you ever see O(2^n) code, kill it with fire.

    i have a bit of code that is $O(n^{(n ln(n))!})$

    I've tried to simplify it many times, but it keeps comming up with answers that are wrong by far more than the allowable margin of error if i use any heuristics to reduce the complexity.

    lucky for me this process only needs to run once a month and N is constrained to be no greater than 2k due to business rules.

    it still takes a full 48 hours to run...

    EDIT: Darn! we don't have mathjax enabled! @PJH, feature request?



  • @accalia said:

    EDIT: Darn! we don't have mathjax enabled! @PJH, feature request?

    We need DiscoBBHTLMarkjax because DiscoBBHTMLarkdown is not confusing enough.


  • Discourse touched me in a no-no place

    @accalia said:

    EDIT: Darn! we don't have mathjax enabled! @PJH, feature request?

    Try asking on meta.d first...


  • FoxDev

    i would give you a like for that, but apparently the like limit has been ratcheted down again and my bot has used up all my likes for the day trying to catch up on the likes thread.

    so have a thanks instead.

    THANKS!


  • FoxDev



  • @ScholRLEA said:

    Sorry, I guess you missed an earlier post of mine; I was referring to SalesForce.com Apex, a proprietary language which is superficially like Java but is in actuality a hobbled, mangled example of vendor lock-in at its worst.

    Hey, I used that too! My first job out of college involved it. Had a spiel from a manager who's pitch to me was basically "Java, but better!"

    The other devs weren't as enthused about it 😄


  • Discourse touched me in a no-no place

    @accalia said:

    $O(n^{(n ln(n))!})$

    O(n(n ln(n))!)

    (And that “!” is rather worrying. Most algorithms manage to avoid that…)


  • FoxDev

    @dkf said:

    O(n(n ln(n)!))

    (And that “!” is rather worrying. Most algorithms manage to avoid that…)


    yep. n raised to the power of ( (n log n) factorial)

    that is a scary bit of code.

    i refuse to work on it without a newly blessed rosary and a spray bottle of holy water. just in case.


  • ♿ (Parody)

    @accalia said:

    that is a scary bit of code.

    What problem is it trying to solve?



  • @boomzilla said:

    What problem is it trying to solve?

    How long does it take for a O(n(n ln(n)!)) algorithm to execute.

    And copy-paste-markup fail....Why do I even try.


  • FoxDev

    it's pretty business rule specific.

    basically it's trying to place exhibitors on an exhibition hall floor such that each exhibitor is:

    • given as much space as they payed for and not more (unless we're undersold)
    • Placed so that they have all the space upgrades they paid for (1, 2 or 3 side access, corner, and about 7 other upgrades)
    • Placed so that the signage package they purchased is valid (there's 8 of those with rules about where they can/must be placed relative to the booth)
    • placed so that vendors they have requested not to be placed near are as far away as possible
    • ditto, but for ones they want to be near
    • many, many, many more rules, including some that have to do with VAT! WHY IS VALUE ADDED TAX INVOLVED IN SHOW FLOOR ARRANGEMENTS?!

  • FoxDev

    about 48 hours. for n<=2k. (usually N is very close to 2k. our sales people are good.)


  • ♿ (Parody)

    This sounds right up my alley (operations research). What are you using (e.g., CPLEX or hand rolled code)?


  • Discourse touched me in a no-no place

    This post is deleted!


  • @accalia said:

    about 48 hours. for n<=2k. (usually N is very close to 2k. our sales people are good.)

    I wasn't asking a question, it was a stupid snarky answer to boomzilla's question.

    @boomzilla said:

    What problem is it trying to solve?

    @mott555 said:

    How long does it take for a O(n(n ln(n)!)) algorithm to execute.

    is the problem it was trying to solve.


    Filed Under: Whoosh


  • FoxDev

    about 70% is C# with the remainder VB.net (legacy, i convert it to C# as i touch it, for the spead increase in the newer .net runtimes if for no other reason)

    hand rolled. and i could reduce it to O(N2ln(N)) if it weren't for those damn VAT rules that are audited with a fine tooth comb (and Accounting's refusal to allow us to send out additional invoices/credits for the ~5 euro of VAT that the heuristic would be off in about 50% of the exhibitors)



  • @ScholRLEA said:

    I'm guessing that being asked to solve undecidable propositions (e.g., ones which can never be proven nor a disproven) and not wanting to tell the boss that it can't be done without being able to explain why is leaving EvanED the indecisive one.

    Oh, don't worry; everyone knows the implications, and many of the managers (up to and including the president and CEO -- not sure why we need both, we're not a big company) have CS PhDs. We know what we're doing. 😄

    @ScholRLEA said:

    Or maybe there is decisive solution: sending out resumes to other companies that don't demand the impossible on a daily basis.
    It's more like even though the problem is undecidable doesn't mean you can't make useful progress. There are still parts of the problem you can come up with very helpful solutions for, essentially by being wrong some of the time, as long as you're right enough of the time people will put up with it. What it means is that a lot of what goes on is trying to figure out what pieces we should bite off and go after, and how to make more of the problem tractable. It's very interesting.



  • Ha CSS!

    I checked this in recently, of course it is now live. Bollocks to code review...

    http://i57.tinypic.com/vg7x8z.png



  • I hope you don't add a class like "left" in the future.



  • Confession: I just found myself documenting a feature by using a regular expression...



  • I got retrenched.

    I will be leaving this company at the end of the month; anyone who is foolhardy enough to add a CSS rule for "left" can suck it.

    But also it is a rule on a <br> tag - how wrong can it get? Unless someone fucks around with :before or :after pseudo selectors on the "left" rule, I can't see any immediate issues.


  • :belt_onion:

    @dkf said:

    Nice trick if you can do it. Some problems are really terrible, to the point where even getting down to O(2N) would be a big research challenge. I used to work with one (years ago) which was natively EXP2SPACE. It blew up so fast, even when we ran on (then brand-new) 8GB supercomputers…

    I had a simple bounding shape algorithm that does convex hulls around geographic coordinates, which I did using Graham scan — O(n log n) — side note, this is what is implemented in D3 geo library which is what I used in the end, d3 is a great library for data work.

    But then the higher ups decided they wanted it to be prettier and have a concave hulls, for which I never found an acceptable algorithm that could run fast enough in javascript to create the hulls without destroying the usability. I did find this: http://ubicomp.algoritmi.uminho.pt/local/concavehull.html which does a really good job, but I think our points are not dense enough for the algorithm to work as well for us (also, that algorithm is probably way too slow to run realtime).

    The confession I guess is that I create a real time user-interactive map in javascript with D3.



  • I was told the other day "Don't fix the markup ... it will break everything" .... there were missing div tags everywhere.



  • @cartman82 said:

    But will killing it with fire scale?

    Doesn't need to. Leave the code running for long enough, your CPU will “discover” fire by itself



  • Nah CPUs have proper engineering in them compared to software.


  • Discourse touched me in a no-no place

    @accalia said:

    EDIT: Darn! we don't have mathjax enabled! @PJH, feature request?

    It's being considered. But it won't be for about a week since it'll need babysitting with you lot around, and Sam's not around much over the next week.


  • FoxDev

    HEY!

    we resemble that remark!

    😸



  • I've never used any .NET GUI technology other than WinForms.


  • Trolleybus Mechanic

    @powerlord said:

    I've never used any .NET GUI technology other than WinForms.

    Right up until two years ago, GUI classic (circa Win 3.1) was about the only Windows presentation technology I'd really worked with.

    Edit/Bonus confession: Up until that time, I hadn't worked with .NET at all.



  • Confession: I used a regex and I liked it.


  • FoxDev

    Once Danny had a problem.

    Then Danny said: "I know! I'll use regular expressions to solve my problem!"

    Now Danny has 2n! problems! (where n is the number of regular expressions that Danny has used to solve his various problems)


Log in to reply