Programming Confessions Thread

I don't use ReSharper, and every time someone tries to convince me to (which is pretty much every time it comes up, because so many C# developers are rabid fans), they just list-off features that Visual Studio already has and has had for decades and I honestly think none of these people really need ReSharper, I think it's been riding on undeserved reputation for years at this point.

Here's another one: I've had the concept of "dependency injection" explained to me about half a dozen times by half a dozen people, and I still don't really understand what it is, or why I would want to use it in my own code. I especially don't understand IoC (Inversion Of Control) containers.

I don't use ReSharper, and every time someone tries to convince me to (which is pretty much every time it comes up, because so many C# developers are rabid fans), they just list-off features that Visual Studio already has and has had for decades and I honestly think none of these people really need ReSharper, I think it's been riding on undeserved reputation for years at this point.

I've been using resharper for so long, I'm no longer sure what the bare VS feels like these days. Here are some features that I depend on that I believe are resharper specific or at least much more advanced than VS:

That's not the point of the thread. Post in the "I LOVE RESHARPER AND HERE'S WHY!!!" thread so I can ignore it.

Oh sorry, let me try again.

I CONFESS I've been using resharper for so long, I'm no longer sure what the bare VS feels like these days. Here are some features that I depend on that I believe are resharper specific or at least much more advanced than VS:

Threads here do not have points, they only have starting points. From there we organically flow to other topics like airplanes, fan fiction involving Professor Snape banging Harry Potter, religion, politics, entitlements, rage quits... Staying on-topic is Doing It Wrong.

I want to write TF2 mods, but every time I think about TF2 I have to stop doing things and play it.

BRB playing.

Well, they're also a pain to write in C++, so invariably everyone ends up using SourceMod's SourcePawn or EventScript's Python.

Most of my stuff is pretty boring administrivia type stuff, but I did take over TF2's PropHunt mod in 2013. (which reminds me, version 3.3.0 beta 5 has been ready to be bumped to 3.3.0 final for a long time now)

Here's another one: I've had the concept of "dependency injection" explained to me about half a dozen times by half a dozen people, and I still don't really understand what it is, or why I would want to use it in my own code. I especially don't understand IoC (Inversion Of Control) containers.

I still don't get the Inversion of Control business, but Dependency Injection is simpler to DIY than people who are used to frameworks like coughSpring ever think it is.

In a nutshell, instead of having your classes go out and find the tools they need to do their job, you hand them the tools they need to do their job, usually at object construction time. Which means if you want to use a Tool 2.0, or a Mock Tool, later on, you can do that without making a change to the class itself, just the consumer who wants to use your class with Tool 2.0.

In Python (for those who have never programmed a snake in their life: __init__ is the Python version of a constructor):

Can you now see where the latter would pose a problem if you needed to use WhizBang with some other tool (for instance, the BlakeyTool which has a 3x improved frobnication algorithm compared to the tool that the WhizBang class originally shipped with) and some other frobulator, say a FakeFrobulator that hooks up to some test data somewhere?

I might as well get it off my chest: I haven't done nearly as much Lisp programming as I try to give the impression I have. Most of my career I've bounced between one language I loathe and another, with the occasional bit of light shining through in the form or Ruby or Python, and I currently am stuck working in a system that seems designed for masochistic coders who like Java but think it isn't WTFy enough for them..

You know what? This is boring. No one's gonna confess something interesting while using their epeen accounts. I am, for example, a proud holder of one of the 77 "2^ 6 Posts" badges. And I wouldn't want my stellar reputation to be tarnished by the dirt exposed in this thread.

That said, my confession is a bit boring.

I don't test.

There ARE a couple of pathetic unit tests and one outdated integration test. I run them once in a blue moon. They often fail. The REAL test is push to production. I like to do my updates in the morning, so I can spend the next few hours monitoring logs and putting out fires that WILL crop up.

So why the WTF? Lack of time, knowledge, manpower and management philosophy.

There. Hope that was worth the trouble of setting up fake account.

Come on guys, bring it on. Take one of the existing fakes or make your own, and dump it out.

My current confessions: still doing PHP and still writing code for environments that are basically impossible to write tests for, to the point where I have given up worrying about even trying to do it.

I might as well get it off my chest: I haven't done nearly as much Lisp programming as I try to give the impression I have. Most of my career I've bounced between one language I loathe and another, with the occasional bit of light shining through in the form or Ruby or Python, and I currently am stuck working in a system that seems designed for masochistic coders who like Java but think it isn't WTFy enough for them

Sounds like they need a Clojure surprise. And yes, Python can be a light at the end of a very dark tunnel, no matter what your feelings about braces and whitespace are.

As much as I would love to do that, ShitFuckDamnitCrap Nadir only looks like Java; it isn't a JVM based system, which means that I'd have to find some way to sneak Clojure in somehow. Man, would I love to do that.

na·dirnoun
the lowest point in the fortunes of a person or organization.
"they had reached the nadir of their sufferings"synonyms: lowest point, lowest level, all-time low, bottom, rock-bottom; informal pits
"the nadir of his career"

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.

No one's gonna confess something interesting while using their epeen accounts. I am, for example, a proud holder of one of the 77 "2^ 6 Posts" badges. And I wouldn't want my stellar reputation to be tarnished by the dirt exposed in this thread.

You know what? This is a good idea. Automatic sockpuppets. So I can post from any of 3 usernames without anyone (except admins) being able to find out.

I've seen automatic sock puppets, I've even seen 'anonymous boards' that aren't quite anonymous (IP tracked but otherwise anonymous to curb full on abuse but in all pragmatic senses...) and I like the idea. I just don't like it enough to think it should be a core feature.

I figure anyone who cares enough about their privacy will already be mindful enough to do the sockpuppet thing, and anyone else who isn't will live and die by the sword. Been there, isn't smart but one learns.

Despite enough courses in OOP that I know how to turn almost any procedural solution into one within the paradigm, I am still unable to imagine any sane person actually conceiving an OO solution from the outset.

When I used it (some time ago), one very nice thing was with unit tests - that fucking attach the debugger thing never failed to irritate me. Resharper provides a nice little icon to click to run the things.

But I think that is fixed now.

I think part of your post is incorrect: Resharper often pioneers features that are picked up by the VS team and added to VS in the next release.

Despite enough courses in OOP that I know how to turn almost any procedural solution into one within the paradigm, I am still unable to imagine any sane person actually conceiving an OO solution from the outset.

There's a specific subset of software architecture design called Object Oriented Analysis which handles how to figure out where the objects and classes are. Mostly you think about improving isolation of functionality, what should delegate to what, what the rôles and responsibilities should be, that sort of thing. To be frank, the whole of OO is about making good use of encapsulation: an object should do what it does, do it well, and do nothing else.

Don't know what an ioc container is, but ioc is about your architecture and what entities depend on what other entities.

An IoC Container is a chunk of code that stitches together your code from the heap of classes that you've made. It's usually driven by the types of properties and their annotations: if you've got a Frobnicator property, it'll try to stuff something in that can do that. It works surprisingly well and gets rid of all the complicated shit of manually-written factories and connecting everything up.

If you're lucky, you can even have GUI tools to do the wiring up (or at least describe the wiring up that is done).

Before anyone asks, yes, it only really makes sense to do all this with a strong object lifecycle model to back it all up. There's typically events you can listen for when going between different lifecycle states, which you can use to do more complex configuration of things.@Shorelinesaid:

spaghetti code, which tastes great and everything, but results in a shirt covered in tomato puree.

+1 for great analogy. (However, “spaghetti code” is usually reserved for things which are GOTO-heavy. The OO equivalent is “ravioli code”. Lots of little parcels, but still that damn sauce on your shirt.)

My confession is also about a failure to unit test things thoroughly. OK, it's the integration project from hell1, and necessarily so, but I still should test it much more. Tests usually only turn up when something breaks in a way that is awkward to debug on a test server.

1Lots of strictly privilege-separated modules, lots of IPC, and redeploying triggers catastrophic memory leaks. And process management in Java, which was an area where Sun completely screwed the pooch and Oracle hasn't fixed jack shit yet. But the whole assembly fucking works despite it all.

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.

I think we will have to dispatch @the_dragon to dispose of such a blasphemous obscenity.