8 ms·
Code Kata: Becoming a better developer
- koopajah 15y agoThese are nice exercises. That could help me motivate myself to start learning a new language and improve a bit like project-euler did for a bit!
- roel_v 15y agoThe problem with this is the same problem that shows in actual karate kata in the context of its broader supposed relation to actual fighting: people get caught up in the minutiae of the exercise itself and forget its purpose, which is to win a fight (or, write a full-on application that does what users want it to do). In karate, this has caused the dilution of most forms of karate (with the exception of Kyokushin) into little more than ritualized movements, where the vast majority of even high-level teachers don't know how it relates to a real fight. Pure theory has taken over - 'when your attacker does a simple forward kick ('teep', don't know what it's called in English), move the leg with your hand!'. Except that that never happens in the real world, and yet it's a core movement in many kata (and kihon etc, not just kata). Now, how does that relate to software? Just knowing how to write a binary tree, or linked list, or singleton, or whatever, doesn't make one capable of writing a program that users want to use. Yes, maybe it makes one capable of writing a perfect program even, in the sense that it may even be mathematically proven correct; yet that's absolutely irrelevant outside of the realm of the theoretical. The basics of this nature are well-documented everywhere already, and it's not necessary to know all of them before doing more integrated exercises; full applications that people actually want to use. Or to make the connection back to martial 'arts' (I hate that word, what's 'arty' about it? We need to get rid of the mystical aura around it - it's fighting, a methodology to inflict maximum, concentrated or controlled damage onto another person, sorry for tangent - it's a pet peeve ;) ); we need to get rid of the karate's, tae kwon do's and capoeira's of the software world (disclaimer: I have brown belts in judo and karate, I get to have an opinion on it ;) ) and we need to go back to the essence - the mixed martial arts of software development: the misv or startup or whatever you want to call it. Actual products for actual users, not fetishising technology for technology's sake. (second disclaimer: I know I'm sort of arguing a straw man here, nobody said anything about not making end-user products, but it's a lot easier to make a point when you don't have to put in all the nuances ;) )
- deleted 15y ago[deleted]
- route66 15y agoNo. I would consider it helpful if there were more people in the industry who would know what a binary tree (or whatever comes to mind) is and when to use it. all means to get there are welcome as far as I'm concerned. This l'art pour l'art accusation comes back once in a while, often in language bashing ("elitist lispers" I read some days ago). As a former musician I recognize it in the shape of "technique ruins your soul" or how one would like to phrase it. I think that the dichotomy is just wrong. It's not detailed knowledge versus pragmatic solution. I spent a great amount of my time in environments where the "shipping it" dominated "understand what you are doing", and I also spent time with drummers who could not keep the time because practicing would ruin their soul. It's knowledge vs. ignorance. What concerns software development: the essence you want to get back to smells to me like the vbscript world I was happy to turn my back to. I would like to see more capoeira, less hash-tables because they are built in. To follow up on your analogy with martial arts: I practice fencing once in a while, a rather ritualized sport, (for some 100 years already): I would not like to inflict maximum controlled damage to my opponent, or the other way round: I'm not training to kill. You might call it a kata I'm working on. Your point "it's not necessary to know all of them before..." I cannot argue with. I would think the same. But the inequality "written by a programmer who cares about knowing his craft" != "people don't want to use" follows not from that statement nor from any other point you are giving.
- singular 15y agoIndeed - I personally think that half the problem with a lot of the software I've worked with is people getting addicted to the idea of just making stuff work and judging quality against that. Any mysterious problems with maintainability / performance / the groans of your colleagues are just strange outside problems that have nothing to do with you and can't be helped and they really should shut up with their new-fangled silly ideas - my stuff works and surely that's what matters? A typical quote from these people might be 'the user doesn't care about the implementation details' - that's true, in the same way a car owner doesn't care if the car's engine is made out of cheese. Somewhat understandably people start to form an ego around this idea, making it harder and harder for them to assess whether there might be better means of engineering their software. As with much of software engineering, the problem is with the wetware rather than the (soft|hard)ware :)
- danso 15y agoKataFour, regarding data munging, makes me smile...I've had to do this so many times while wondering, "Is this hard just because I'm doing it the wrong way?"...but it's good to see it's worth a brainteaser exercise. The weather.dat file in particular is like a vexing issue I've come across when converting PDF tables to text and then writing a script to delimit them. You can't just use a regex because some rows are entirely blank for some fields. I wrote a solution here for PDFs I had to munge for work: http://www.propublica.org/nerds/item/turning-pdfs-to-text-doc-dollars-guide http://www.propublica.org/nerds/item/turning-pdfs-to-text-do... Basically, you start with some regex pattern as a delimiter and loop through every line and record the left-most position of each value. Then you compare it to a global array that stores the left-most position so far found in the document for a particular column. If the current row has a column x that starts farther to the left than the global array's column x, then that must mean there is a column between x and x-1. There's some tinkering that has to be done with that, especially if the PDF to text conversion was ugly. But it would work pretty well for this particular set of data.