Hacker News new | past | comments | ask | show | jobs | submit login

Well, I am pretty average programmer. Not the worst, not the best.

The code reliability of assembly programs is better because programming algorithms in low level, the programmer controls every aspect of the execution. Notice, that excessive use of code generation macros will cancel this advantage.

Another advantage is that the bugs in assembly programs usually cause immediate crash of the program and this making the fixing easy.

Defer crashes and strange/random/undefined behavior of bugs in assembly programs is rare. IMO, this is because of reduced count of abstraction layers.




What about code maintainability and readability - I'm guessing that must be worse when compared to a HLL? Also, what made you get into writing complex programs in assembly - was it just the extra control? I've used assembly when I needed to optimise my C code, but it was a slow and difficult process! I would not really choose it for complex stuff, but I'm really interested to hear your point of view.


Code maintainability and readability depends only on the programmers knowledge of the language/framework/libraries used.

For example, I don't know Lisp, so for me it is much harder to read/maintain Lisp project than assembly language project.


Thanks for sharing! This is really interesting, especially the part about the reduced count of abstraction layers. Do you think the abstraction layers are the problem, or the fact that the overwhelming majority of "abstractions" that materialize in modern high-level software are leaky?


Why adding abstraction layers makes programming easier?

Because allow the programmer to not think (and even know) about some things and leaving them to the layer/libraries.

But every layer adds also a level of obscurity. The interaction between multiply layers is even more undefined and random.

It is OK while everything goes as expected. But when there are problems, the obscurity can make the debugging a hell.

In addition, the behavior of the bugs hidden deep in the layers (or in the way the layers interacts in between and with the application) can be really weird.

That is why, IMHO, the programmer should keep the abstraction layers to the minimal count that allows solving programming tasks with minimal effort, counting not only the coding time, but debugging and supporting time as well.

In my practice, I decided that using FASM with Fresh IDE and set of assembly libraries gives me the needed quality of the code.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: