Confessions of an Intermediate Programmer
21–30 of 118 posts
Re: Confessions of an Intermediate Programmer
#22What are the best ways to get better?
Failure can be tough and sneaky: I didn't want to fail, so I Googled to see how others did it until I was sure... Then found I couldn't reach a consensus, and ended up "researching" for months. Sometimes doing it wrong isn't failing, after all, you've just found a way that didn't work-- that's progress.
Oh and reading or knowing how to do it isn't doing it. There can be quite a bit of work to doing it yourself, don't skip the exercises at the end of the metaphorical chapter ;-)
Re: Confessions of an Intermediate Programmer
#23Re: Confessions of an Intermediate Programmer
#24Earlier quoted context omitted.
It's funny, as a kid I can remember thinking: "Right, everything has to go in the main function unless absolutely necessary, it will just be easier to read that way." Nowadays, it's the exact opposite!
My code changed in a similar way, however I recently devolved. I've mostly worked with higher level languages, and recently delved back into C. I had forgotten what a complete pain in the ass it is to pass complex data structures around between functions. I'm a bit ashamed to admit my functions got pretty damn beefy real quick.
Re: Confessions of an Intermediate Programmer
#251. I write and rewrite more now. I view the first time the code works as just the first draft (like I would with a paper). Earlier in my career I thought that making it work meant I was done.
2. I spend a lot more time thinking about what's happening in the code and why. I have found some of my best work to happen after days of thinking about small bits of functionality.
3. I get the domain (ie. the big picture) much better. This is insanely valuable and helps me step back.
4. I listen more to opposing views. That's not to say I don't argue my point, but afterwards I spend time to rehash what the other person said when I have no pressure to respond. This guides my thinking a lot as it give me an opportunity to change views/positions.
5. I'm increasingly tolerant of other technologies. I use x, but y must be good too b/c smart people use it.
5.a While I'm more tolerant, I'm less distracted. When I was younger, I spent more time switching technologies to learn "new things". Now I spend more time going deeper on my current stack to learn new things.
6. I now think its ok to write code in a "non optimal" way if it makes it easier for the entire team to work with. I don't believe in writing to the LCD, however I do believe programming just a little above the team's moving average capability is probably better than writing above everyone's head (whether by me or someone better than me).
Re: Confessions of an Intermediate Programmer
#26Earlier quoted context omitted.
It's normal but can be really, really scary if you don't have a mentor or someone to help you out or point out some of the pitfalls on the way. Even something as fundamental as version control is, I think, passed up by a lot of beginning/intermediate programmers because "it's complicated" and "I don't need it now because I'm the only one working on this." But a mentor can help push you into that earlier and walk you…
Version control is one of those areas that is very difficult for a lone programmer to understand the need for (I was one). After all, I have backups, right? So why would I need it? Then I hit a snag, where something that worked before somehow didn't work now. And it was a lot harder tracking that down by going through backups, vs doing a git bisect and git revert. Eventually I ended up restoring every backup, and che…
Re: Confessions of an Intermediate Programmer
#27For me the thing I had to learn was commenting more than anything else; working alone I never saw as much use for it. Then I worked with a guy that commented his code very well and suddenly I saw massive value in it. I'm definitely still an intermediate programmer, but I think I was always fine admitting that to myself. It was getting over the fear of others reading and modifying my code that took me a while.
Re: Confessions of an Intermediate Programmer
#28I found this so striking in part because of recent events: Mark Karpeles's mother defending him as a genius, Karpeles not delegating coding to experienced developers and focusing on being a CEO, the leaked PHP MtGox code...
The bit of leaked PHP code I saw seemed to be reasonably structured? Now, I wouldn't necessarily use PHP for this sort of work, but...
Those 100 line functions wouldn't make it through any half decent code review. Zero modularization, dal is inextricably linked to almost every piece of logic in the thing. Its an object called "Bitcoin" and I have a feeling it is 95% of mt gox' business logic if not all of it, it even writes raw xml to a temp pointer before dumping it into a cache and then making calls to header(). Separation of concerns? What are concerns?
Sure its tabbed neatly, and its got camelCasing, its using some form of orm/query thingy going on in there, but its still one hell of an unmaintainable, untestable mess.
I'd rather a thousand lines of spaghetti than ever having to work on something like that.
Re: Confessions of an Intermediate Programmer
#29Earlier quoted context omitted.
My code changed in a similar way, however I recently devolved. I've mostly worked with higher level languages, and recently delved back into C. I had forgotten what a complete pain in the ass it is to pass complex data structures around between functions. I'm a bit ashamed to admit my functions got pretty damn beefy real quick.
&structure ... ?
AFAIK, that's only a legal function signature in C++.
To the point of the question : when I wrote that, I was specifically thinking of 2-dimensional arrays, not structs per se.