3 ms·
This reminds me of a manager of mine who wrote a 10,000 line Perl script. He thought himself how to write Perl in a week. And then started coding. He wrote a s
by kamaal 14y ago
This reminds me of a manager of mine who wrote a 10,000 line Perl script.
He thought himself how to write Perl in a week. And then started coding. He wrote a script to automate a very tedious testing process so perfectly, we were able to reduce our test team by like 70% and test more precisely than before.
It was fully procedural code. And it looked monstrous. Our architect challenged him that it won't workout. He even challenged to rewrite it in Java, but that project never finished. He was never able to ever complete the rewrite.
It motivated me to learn Perl. Since then my life has been totally different. I've done mountains of work alone working, hacking during nights.
I learned the following things from that episode:
1. First write the program.
2. Write the correct program.
3. Write the program to run fast and efficient(scalability and all that)
4. Beautify the program.
But most people never cross 2)- The point is there are tons of people who can do this tasks related to micro optimization. The people who win in a ordinary work environment are ones who know the art of converting ideas to sell able products in the fastest way possible.
By the way that manager also wrote database clients in C++ which helped us troubleshoot our in memory databases from remote locations. Again the architect challenged to get it done Java, as before the project never completed :)
Its a fact that majority of the software world is hacked and held in existence with tools like Perl and Php. The people who care about artistic elegance are few, they often fail and generally don't matter.
- arethuza 14y agoIsn't your list a variation on the well known list of: - Make it work - Make it right - Make it fast http://c2.com/cgi/wiki?MakeItWorkMakeItRightMakeItFast http://c2.com/cgi/wiki?MakeItWorkMakeItRightMakeItFast
- alexfoo 14y agoDepends on whether step 2 is a complete rewrite (in a different language) or further hacking to "make it right". My process tends to be: 1. Make it work - Knock up a prototype (lots of assumptions made and noted, limited error checking, etc) 2. Make it right - By starting from scratch and use what was learned in making the prototype 3. Make it fast(er) - Having a prototype, and trying it at scale, should have already given me an idea of what algorithms/structures to use/avoid in Stage #2 but, obviously, a further optimisation stage will almost always be beneficial. Ideally (if time allows) the prototype is written in a completely different language to the desired target. This is the most important point. Most of the production code I write is C and I tend to do my prototypes in Perl. The helps me for several reasons: a) ADTs (lists, hashes/dictionaries, etc) are just easier/quicker in Perl/python/ruby than in C (I do have my own C library that I reuse for ADTs so it's not as if it's a great chore writing them each time, but ADT instantiation is just easier in Perl/python/ruby than C). b) It's also easier to play around with different algorithms if you can switch between ADTs more easily. c) I can use the prototype stage to continue to learn new languages (it used to just be Perl but has extended to include languages like Python and ruby). This list will keep on growing. d) It prevents me (or the business) stopping at Stage #1 and using the prototype code for production. (This could be even worse if the prototype was written in C.) e) A prototype, being quicker to knock up, means faster to getting it in-front of someone else to look at and give feedback. f) It prevents me just copy-and-pasting chunks of the prototype code as production code so I, hopefully, don't carry over any of the assumptions I'd made in creating the prototype. g) "Knock up a prototype" doesn't mean no design/testing/etc. I usually end up with design notes and some automated black box testing that can be reused in the later stages.
- alexchamberlain 14y agoThe architect sounds obsessed with Java... first sign of craziness! Disclaimer: I like C/C++/Python.
- kamaal 14y agoActually its all the 'design' craze. Most architects think drawing UML diagrams on mspaint to be a sign of technical superiority. The real issue I think is heavy OO programmers(read java) can't live without. 1. Design patterns- The art of bloating already heavily bloated code. 2. Avoiding meta programming of any kind. 3. Love towards getters/settters and absolutely anything that lends to code bureaucracy. Why get/set variable directly when you can write tens of classes of methods to set them? 4. Avoid learning the command line. And write bad implementations of sub functionalities of tools like awk/sed to achieve the same tasks. 5. Lengthen anything and everything as much as you can. thisIncludesTheVariableNames, Class names, methods names, package hierarchies, class inheritance. You name it they can pointlessly lengthen it. 6. If you write code in file at least 40% of the lines MUST be try/catch statements. If you can't be satisfied with that write your won exception classes and invoke point 5. 7. Always write code which can't be read or figured out unless you have auto complete, intellisense and other IDE goodies. 8. Use XML as much as you can so that you can dogfood your insanity even more. 9. Make the code so verbose that even simple programs sound like very complicated ones that can be written only by you. and many more... If you don't follow these points Java programmers/architects think you are writing bad code.
- raverbashing 14y agoSo much this 100 lines of python can be turned into a hundred men-hours / 6-digit budget project in Java
- aguynamedrich 14y agoSo, the language choice of a piece of software determines the amount of time and money that is required to build the system?