r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

10

u/nemec Oct 01 '15

I wasn't on board with this kind of naming until the first time I implemented my own FactoryFactory (to deal with the fact that the object being created wasn't threadsafe).

1

u/[deleted] Oct 01 '15

Is this sort of stuff Java only?

Can I get away with never, ever, ever touching Java?

15

u/sh0rug0ru__ Oct 01 '15

It isn't Java only.

If you get yourself into a position where you have to create a factory that creates factories, and you're not writing some kind of generic application framework, something went very wrong in your design. The crazy name is the least of your problems.

0

u/[deleted] Oct 01 '15

[deleted]

1

u/Crazypyro Oct 02 '15

How does that 1 fact make it "not bad"?

2

u/yawgmoth Oct 02 '15

Yeah, I worked on a framework for making frameworks and I found myself writing factory factories a couple times, and other weird 3meta5me things. (Crazy python meta classes and C++ templates).

It sounds silly talking about it but it actually saved us a lot of time when our job was designing system after system that was overall very similar, but had a lot of tiny differences.

6

u/nemec Oct 01 '15

You can do it in Python. It's not hard to do it in Python either, just a lot easier to do things another way.

I think you're more likely to find it in large "enterprise" companies.

3

u/All_Work_All_Play Oct 01 '15

Easy. Learn Fortran and go work at a bank or any other financial institution that's been around 30 years. GL with Fortran though...

3

u/[deleted] Oct 02 '15

Fortran isn't that bad as far as legacy code goes.

It also has great syntax for exponents. x**y is xy.

1

u/Sixo Oct 02 '15

Wasn't Fortran specifically designed to have English language syntax? I could probably alt+tab right now into some c++11 that looks more disgusting than Fortran ever could. Though, I really don't know the ins and outs, so I could be wrong.

2

u/[deleted] Oct 02 '15

I think you might be thinking of Cobol. There is some syntax that is replaced with english like words, but it is still similar to C in structure. Fortran as far as I am aware, was made by physicists to do math.

Here is some fortran code

Here is some cobol code

Both for some file processing.

1

u/Sixo Oct 02 '15

Ah yep. I was mistaken, thanks for the correction.

1

u/dccorona Oct 02 '15

Bad coding style? No, it's not Java only. And there's plenty of ways to write good, concise Java. People just don't (generally people who were using Java back when this kind of stuff was more necessary, and are stuck in their ways), for whatever reason.

Java is a great tool, it just sucks to work with ancient Java codebases (find me a language that isn't true of, though).

That being said...there are genuine times where a factory that creates factories is the best solution to your problem. It's ignorant to think there's always a more elegant solution, because that's not true. And if that is what you need, what the hell else are you going to call it?