News for hackers. Stuff that matters.

dkrikun

Re:Recursive Make Considered Harmful (1997) [pdf] on Sunday May 26, 2019 @01:25PM (#20016093)
so true, made my day
Re:Why OO Sucks by Joe Armstrong (2000) on Monday April 22, 2019 @01:58AM (#19716854)
No, it does not have to be async. My impressions from using Squeak regarding this matter:

1. You can send any message to any object. In case the object does not have a suitable handler, you will get an exception: <object> does not understand <message>. The whole thing is very dynamic.

2. There is no `static` BS like in c# or java. This is because each method has to be a method of an object. For each class there is a metaclass which is an object too, see: https://en.m.wikipedia.org/wiki/Metaclass#/media/File%3ASmal...

winlister for me. It is like process explorer for windows. When you develop something window related and you have no idea where is a window -- winlister can tell you whether it is hidden, or maybe have left-top out of the monitor
try reflex arena
Re:Designing Resilient Systems: Circuit Breakers or Retries? on Wednesday December 26, 2018 @04:17AM (#18761371)
Question: how relevant is this with the serverless? Don't cloud providers provide also these kind of tools?
Re:Write Everything Twice on Wednesday December 26, 2018 @04:02AM (#18761337)
This is a good advice, but I feel to add a few points of mine:

1. the author says "premature optmization", and it has the right context, however I prefer to use "premature abstraction" or even "speculative generalization".

2. YAGNI and DRY can be counter-principles because at times "you aint gonna need that level of abstraction/genericity".

3. Inadequately abstract and generic code hurts simplicity and readability.

Re:The Best Programming Advice I Ever Got (2012) on Sunday December 16, 2018 @02:41AM (#18692184)
I did and I know the author says "actually it is a terrible advise" but he also continues to soften his statement
Re:The Best Programming Advice I Ever Got (2012) on Sunday December 16, 2018 @02:08AM (#18692107)
Could not disagree more. The author most probably freed the company from its dysfunctional stagnation due to some political issue. It is thanks to his ignorance that he resolved an issue, something that had to be done.

In general, staying out of other people code is a bad idea. It promotes lack of transparency and agenda proliferation. This is because the owners of the code start being a "monopoly", can work less hard, provide exaggerated estimates etc. When people know that others can read there code, maybe hack on it, make something faster or simpler -- well they work harder and tend to be more transparent.

Re:The Best Programming Advice I Ever Got (2012) on Sunday December 16, 2018 @01:50AM (#18692072)
"Great advice if you want a miserable 40 year career as a team player in mind numbing corporate work prevention departments"

This

Re:The True Cost of Rewrites on Saturday December 15, 2018 @12:43PM (#18689370)
It is mainly a matter of decision making. In my case, no refactoring was ever sanctioned by itself. Devs were having been allowed to refactor anything on a small scale and always backed up by a feature request. So when the desire to somehow "heal" the codebase is met, it is usually because it is already too "dead" to work with in the first place.
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Saturday December 15, 2018 @12:31PM (#18689308)
Yes most of these things are terrible
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Saturday December 15, 2018 @12:29PM (#18689295)
Yeah, I just tried to be on the more "permissive" side of things. Though per-library errno is being used (zeromq, libuv).
Re:How TDD Can Prevent Over-Engineering on Saturday December 15, 2018 @12:27PM (#18689279)
It is unpopular opinion, but not all code can be cost-effectively validated by unittests at all. I have been maintaining codebases where the customer would come and change his requirements on a weekly basis. While I could set up unittests to validate the code that implemented these requirements, doing so would demand significantly more effort than the code itself. I'm talking about some 3d graphics, game logic code. Instead setting up a simple ui (with imgui) to play with the state of the game scene provided much more confidence per man hour.
Re:The True Cost of Rewrites on Saturday December 15, 2018 @12:12PM (#18689214)
There is a lot of advice here to do incremental rewrites, refactoring, unittesting, functional/system testing etc.

Undoubtfuly it is all mature and correct advise. However, I feel it is all one-sided and I ought to provide some counter points:

1. The codebase in question may be well beyond the line where any sane person would touch it, seriously.

2. Individuals experienced with the codebase, its structure, implementation, technology stack might be not available (think cobol).

3. Refactoring or incremental rewrite is a process that has to be planned and managed s.t. current product/codebase structure. Oftencase it is this very structure, which demands the full rewrite -- because of it being too convoluted to allow refactoring to take place.

4. You might want to do a rewrite to refresh the tech. stack -- language, design, frameworks -- it is ok to do so.

5. You do not necessarily need to come with the same feature set. Both you and your customers might want to cut down unnecessary cruft. Technical debt usually starts to show its signs with losing flexibility w.r.t user request to change features.

6. Occasionaly you might come up with a separate, different product, with a different name and brand -- which might turn out to be even better!

7. You learn a lot in the process.

Re:The True Cost of Rewrites on Saturday December 15, 2018 @11:08AM (#18688903)
People usually tend to accept that efforts to build a products are oftentimes underestimated, but somehow accepting the same kind of underestimation is hard. So what? Even if the rewrite takes more time and money it can still be successful if it substantially reduces costs, relative to the original software. The important part is to push through the hard part to receive adoption.
Re:String tokenization in C on Saturday December 15, 2018 @10:59AM (#18688859)
There are numerous reasons to write in C, apart from caring so much. Using strtok() is not that bad after all because its a simple function after all.
Re:How TDD Can Prevent Over-Engineering on Thursday December 13, 2018 @02:50AM (#18670573)
Nice article, the problem though, is that TDD'ing might already be over-engineering in the first place.
Re:Why Use F#? on Thursday December 13, 2018 @02:24AM (#18670468)
Seems like a decent alternative to C# on dotnet. Its a pity it feels second-class.
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Thursday December 13, 2018 @02:19AM (#18670449)
They have originated from C++, fine, but it is a different language, different ecosystem, different community, different ideology and -- different idioms
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Thursday December 13, 2018 @01:32AM (#18670294)
People mostly keep saying that: 1. C++ has at least everything C got, and "other features" so it cannot be worse. 2. C++ is safer than C.

Regarding 1.: a. C99 and C++11 have diverged. For example, `struct xx x = {0}` has different meaning in those languages. b. Lack of certain "features" is an advantage. See, C++ is a huge and complex language (r-values, x-values, exception safety, templates, sfinae and so on and so forth). Yes, you can restrain yourself from using them. But can you restrain others working on your codebase, now and in the future effectively? Good luck writing and maintaining code style guidelines..

2. Well, yes, by using smart pointers, STL, RAII, C++ is safer than C for small, fresh codebases. But remember: C++ was designed for backward compatibility with C. It's full of undefined behaviour and pointer arithmetics. Be careless once and all the safety is gone, and then it will be harder to debug than plain old C.

Re:Why should I have written ZeroMQ in C, not C++ (2012) on Thursday December 13, 2018 @01:14AM (#18670233)
There are certain widely accepted norms on how to handle errors in C. It is best to restrain ourselves to "prior art" so that your code is immediately comfortable to read and use for a seasoned C dev. To list a few: return codes, errno and longjump
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Thursday December 13, 2018 @01:09AM (#18670222)
Writing C++ like Java (or any other language for that matter) won't help anyone. The code will turn out non-idiomatic and weird for any couple of C++-eyeballs.
Re:Why should I have written ZeroMQ in C, not C++ (2012) on Thursday December 13, 2018 @12:57AM (#18670187)
C++ is definitely not a subset and its not just from purely linguistic considerations. Also, given that zeromq is a community-driven project, requiring the contributors to use C++ but avoid 50% of features is weird and non-idiomatic at best. If you want to C -- C.
Re:Neither PWA nor AMP are needed to make a website load fast on Friday December 07, 2018 @03:38AM (#18626020)
gj using plain old js+html, very nice))
Re:BladeRF 2.0 micro on Sunday December 02, 2018 @12:03PM (#18583145)
Newbie question: what interesting applications does this technology have?
Re:10 Tr Command Examples in Linux on Saturday October 27, 2018 @12:42PM (#18316497)
Interesting, is tr functionality a subset of sed (roughly)?

I think tr < sed < awk < perl

Old dumbphone indestructible nokia phones. That was a thing. I usually have a dumbphone at in case my smart one fails, but the dumbphones of today are just like cheap junk..

Older »