News for hackers. Stuff that matters.
Re:John Carmack: “I just dumped the C++ server I wrote for a... by nine_k on Tuesday March 17, 2015 @10:54PM (#9223323)
You know what's the problem with boring code? It's boring. This means its information content is low, and its abstraction level is low. This means that you need more of it to express an algorithm.

When you have a lot of wordy, boring code to maintain, you have to make coordinated changes in more similarly boring places. A human's brain can only keep that many lines of context. So it becomes easier to make a mistake.

I understand that abstraction astronautics can leave you with puzzling, convoluted, hard-to-maintain code full of leaky unintuitive abstractions. This problem is not unique to Lisp macros; languages like C++ and even Java are known to be widely used by perpetrators of the above-mentioned atrocities.

What makes code easier to maintain is clear separation of concerns and low impedance between code's abstractions and the subject area. This is, again, attainable in a number of languages (though expressive power and minimalism help make it even nicer), given the right mindset and skills. I suppose John Carmack possesses both.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by mrits on Tuesday March 17, 2015 @11:18PM (#9223397)
I recently watch a colleague write an elaborate system to parse a few different CSV feeds. There are a dozen different interfaces and mixed in with all the lovely Java design patterns.

I'm beginning to use a phrase that I'd rather deal with poorly written code than well planned architecture. Obviously by well planned architecture I'm referring to overly architected solutions.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by chipsy on Wednesday March 18, 2015 @03:12AM (#9224036)
When it comes to architecture, I've lately turned towards BCNF as my god. My premise is that if my data model - my internal application data, not just "the database" - is as in as normalized a form as I can reasonably get it given typical constraints of procedural/OO/functional styles, my features automatically grow into a flexible and decoupled grain because they're operating on exactly the right slice of data, no more, no less. "Guess and check" and "OO design pattern" strategies don't seem to get me there because they tend to start with whatever is language-easy or looks pretty at first glance, and then take on the problems later. And it seems to work - the thing I have right now is, indeed, incredibly flexible for the amount of code involved. And it isn't really "architected" in the usual sense otherwise - there are no grand plans.

The only problem I'm having with this tack is that it reveals all the technical debt at once, which produces an enormous amount of pain early on. My friends smirked at my woes today of trying to make a clickable button, which has to piece together stuff from the graphics layer, input events, text fields, and internal button state. An enormous variety of data, altogether, with the debt usually hidden from view at some level. It all makes sense, it's all decoupled, the lifetime of the state is automatically managed, any configuration you want will just be a matter of making the data for it. But making that first button is quite a headache.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by agumonkey on Wednesday March 18, 2015 @04:04AM (#9224173)
I had a funny feeling doing a SQL MOOC when I had to re-learn normalization, and how it was a very generic decoupling algorithm. Suddenly all OOP became tiny and ad-hoc.
Re:John Carmack: “I just dumped the C++ server I wrote for a... by nekopa on Wednesday March 18, 2015 @09:08AM (#9225137)
Would you mind telling me which MOOC you did for SQL? I am quite rusty - (~10 years since I did any serious SQL stuff) but I am finding it is coming up quite a lot now for me.
Re:John Carmack: “I just dumped the C++ server I wrote for a... by agumonkey on Wednesday March 18, 2015 @03:32PM (#9228111)
IIRC it was Stanford's (I have memories of a mainly red interface)

http://www.erictimmons.com/node/18

I don't know if it qualifies for serious, I'd say challenging enough, but it was great to revisit with another university material.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by nekopa on Saturday March 21, 2015 @05:54AM (#9242281)
Thanks for that. In case anyone else is interested, they now have it set up as a self-paced course here:

https://class.stanford.edu/courses/DB/2014/SelfPaced/about

Re:John Carmack: “I just dumped the C++ server I wrote for a... by nine_k on Tuesday March 17, 2015 @11:50PM (#9223490)
A well-planned architecture is often the smallest thing that works correctly. A well-architected car is unlikely to have 37 wheels (though a poorly-built one might).

You know, the ideal device is that which is not even there, but its function gets executed. This ideal is rarely attainable, but it's something to crave for.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by therealdrag0 on Wednesday March 18, 2015 @12:17AM (#9223581)
Very much this. Refactoring simple code to handle more complicated situation as it develops is so much better than pre-engineering for possibilities.
Re:John Carmack: “I just dumped the C++ server I wrote for a... by nstart on Wednesday March 18, 2015 @12:46AM (#9223669)
This! I joined a new company recently to build out the systems. Instead of trying to predict the future and build for it, I just went ahead and built a bare minimum architecture and used TDD for it while doing so. The start was a little slow, but now when I get requests to change things entirely (eg - an entire segment of logic was requested to be shifted into the database for an administrator to manage its behaviour), I get it done fairly quick.

On a side note... Uncle Bob is my hero.

Re:John Carmack: “I just dumped the C++ server I wrote for a... by kd0amg on Wednesday March 18, 2015 @09:40AM (#9225338)
You know what's the problem with boring code? It's boring. This means its information content is low, and its abstraction level is low. This means that you need more of it to express an algorithm.

When you have a lot of wordy, boring code to maintain, you have to make coordinated changes in more similarly boring places. A human's brain can only keep that many lines of context. So it becomes easier to make a mistake.

A problem nicely summarized by Yaron Minsky (of Jane Street): "You can’t pay people enough to carefully debug boring boilerplate code. I’ve tried."

Re:John Carmack: “I just dumped the C++ server I wrote for a... by fauigerzigerk on Wednesday March 18, 2015 @06:43AM (#9224583)
You know what's the problem with boring code? It's boring. This means its information content is low, and its abstraction level is low. This means that you need more of it to express an algorithm.

Code may also be boring simply because it is unsurprising for someone familiar with the subject matter.