Better HN
topnewbestaskshowjobs
Log inSign up

deterministic

2,859 karma · joined Feb 27, 2013 (13y ago) · 3,460 submissions

Submissions

comment 2y ago · link · parent

I design events following these rules:

1. You should be able to recreate the complete business state from the complete event sequence only. No reaching out to other servers/servies/DB’s to get data.

2. The events should be as small as possible. So only carry the minimum data needed to implement rule #1

That’s it. It works really well in practice.

comment 2y ago · link · parent

30+ years here both as a manager and developer.

I usually just maintain a priority list and work on (or assign) whatever is #1 priority. It’s simple. It works.

It means I never say no. I just negotiate where to put it in the priority list. It’s a great way for people to realise the trade offs of what they are proposing.

comment 2y ago · link · parent

Agree. For some reason many developers thinks that “new” is automatically better than “old”. Which is certifiably crazy.

Old typically means fully bug fixed, with known limits and work arounds, and lots of examples to learn from. And a long track record of solutions using it.

New typically means full of bugs, unknown limits and work arounds, and very few examples to learn from. Plus a high chance of being abandoned and not supported 6 months or a year from now.

Given that, why on earth would you ever choose New over Old? Unless it is for fun personal projects.

comment 2y ago · link · parent

Couldn’t agree more. Professionals use battle proven tools. Amateurs reach for whatever is the most shiny tech currently being pushed by cloud providers or open source advocates.

comment 2y ago · link · parent

Not impressed. I currently auto generate 90% or more of the code I need to implement business solutions. With no AI involved. Just high level declarations of intent auto translated to C++/Typescript/…

comment 2y ago · link · parent

I completely agree. Simple systems (when designed well) can be more reliable and easier to maintain than large complicated spaghetti systems.

comment 2y ago · link · parent

Maybe just maybe hire better C developers? Just an idea.

comment 2y ago · link · parent

You can absolutely reason locally with libraries. A library has an API that defines its boundary. And you can enforce that only the API can be called from the main application.

comment 2y ago · link · parent

Agree 100%

A monolith with N libraries (instead of N microservices) work so much better in my experience. You avoid the networking overhead, and the complexity of reasoning about all the possible ways N microservices will behave when one or more microservices crash.

comment 2y ago · link · parent

I just use a simple priority list when managing teams or working individually.

New issues are added to the list based on priority. And only “emergency” issues can pause current work to be paused.

Everything else is done face to face as needed without formal meetings.

It’s simple. It works.

comment 2y ago · link · parent

As somebody who is currently experiencing depression/anxiety can you talk more on what happened with you and how you improved?

comment 2y ago · link · parent

> If AI is helping people code better

I don't think it is?

30+ years of experience here and I haven't seen any AI coding examples that makes me want to use AI for coding.

It might happen one day but so far nope.

comment 2y ago · link · parent

All you need to create quality software is:

1. A continuously updated priority list. 2. A good team that work on tasks in strict priority order. 3. Automatic tests that stress tests the API of whatever you are developing. 4. No BS.

comment 2y ago · link · parent

Never ask permission to do maintenance work. You are a professional. Just do it as part of your daily work.

comment 2y ago · link · parent

I think about it this way:

A state is an identifier for a sequence of "atomically" changing values.

By "atomically" I mean before/after an event is handled end-to-end.

comment 2y ago · link · parent

I save a lot of work code generating the non-biz-logic parts of applications from simple declarative specs. I typically end up having to only hand code about 10% of the application.

No AI required.

comment 2y ago · link · parent

DST is excellent. I use it whenever I need to implement hard-to-prove-correct algorithms and systems.

It is not as good as proving the code correct of course but it is very pragmatic and you are testing the actual code.

comment 2y ago · link · parent

My working theory is that Lisp perfectly fits how a minority of developer brains work. So there will always be a new generation of Lispers that rediscover the beauty of Lisp, while failing to understand why the majority of developers don’t adapt it.

The same way that types work well for most developers but not for others: Different brains and personalities operate differently. We are not all the same.

For that reason, I am sure 50 years from now there will still be Lisp enthusiasts absolutely believing that Lisp is facing a bright future and will be adapted by the majority of developers any time soon :)

And that’s fine. Choose the tool that works for you and make you happy and carry on :)

comment 2y ago · link · parent

I notice this all the time in software development. A majority of developers would rather spend months or years doing the obvious (but slow) thing rather than spend a few days thinking hard and then implemented a simple solution instead.

The latest example I noticed is a colleague at work who spent more than a year hand converting thousands of SQL scripts from Oracle to Postgress. Instead of simply parsing the Oracle scripts and auto translate them.

Another example I have seen are developers hand coding messages and message protocols and DB schemas etc. instead of auto generating everything from a declarative spec.

Hot tip: Almost 90% of the code you need in a typical biz applications can be auto generated. Yes it does require that you think hard about the architecture you use. But it is worth it!

A third example I have noticed are developers spending years rewriting their code to work in the cloud, followed by years of work rewriting the code away from the cloud because of cost. We are talking years of wasted work.

A fourth example is a developer painstakingly hand converting a Java protocol to C++ instead of using Java reflection to automate it.

I could go on and on and on. It’s crazy.

comment 2y ago · link · parent

The problem with the Space Shuttle development methology is that it is insanely expensive and slow and still not 100% bug free.

It is so expensive and slow that it would be much cheaper, faster, and actually safer to prove the software correct using modern proof assistants.

Projects like seL4, CompCert etc. shows how it should be done.

comment 2y ago · link · parent

This is how important code should be written. No abstractions, with comments saying why things are implemented this way (instead of just saying what the code does).

I wish more code would be written this way.

comment 2y ago · link · parent

I loved reading this article. It made me laugh and cry and rage scream all at the same time. It is a true miracle that most things work most of the time. Don't look behind the curtains fowks! It might give you nightmares.

comment 2y ago · link · parent

Not true. At work we maintain 1 million+ line C/C++ applications and libraries that run large international companies all around the world. And we hire C/C++ developers all the time.

comment 2y ago · link · parent

Ozempic is not a long term solution. Studying nutrition, changing your diet to be healthier, and making sure you are on track by getting regular full panel blood tests is.

comment 2y ago · link · parent

I will argue that Python is the BASIC of today. Am I wrong? If yes why?

comment 2y ago · link · parent

More than 90% of my C++ code is generated by a code generator from declarative specs. No need for AI. And I trust the output.

comment 2y ago · link · parent

Agree 100%. I have never seen the rule to be true in my 30+ year career. And I routinely work on million+ line C++ applications running large international businesses.

comment 2y ago · link · parent

I am not a fan of Lisp. However I sure wish all command line tools would use the same Lisp dialect for scripting. Instead of each Linux tool inventing their own awful, badly documented, makes-you-want-to-vomit bad joke of a scripting language.

comment 2y ago · link · parent

What works for me:

There are two types of objects: State objects and Tool objects.

The purpose of a State object is to maintain a state. Think strings, databases, files etc.

The purpose of a Tool object is to operate on State objects. Think loaders, printers, editors, transformers etc.

It’s a simple way to organise OO code. And it works. At very large scale (millions of lines of C++).

It is similar to the functional Data/Function thinking. However it actually works better because State objects can enforce constraints, and Tool objects can cleanly maintain an internal temporary state while operating on State objects.

1
171819
116