Better HN
topnewbestaskshowjobs
Log inSign up

deterministic

2,860 karma · joined Feb 27, 2013 (13y ago) · 3,465 submissions

Submissions

comment 4y ago · link · parent

Professional mathematicians are today using dependent types in LEAN to prove leading edge mathematics. Google LEAN and mathlib.

comment 4y ago · link · parent

It literally is. Martin Luff Type Theory is the mathematical foundation used by most proof assistants today. The type checker is the prover. If your code type checks then you have proven a theory. I highly recommend learning more about the Curry Howard correspondence and Dependent Types. It might just blow your mind.

comment 4y ago · link · parent

All of those problems can be proven correct today using Coq/HOL/LEAN etc. see CompCert, seL4 etc. The math needed by Computer Scientists to prove correct is very different from what Mathematicians care about. Look at the mathlib project done by mathematicians in LEAN. It is pretty much useless if you want to prove code correct.

comment 4y ago · link · parent

Mathematicians are using LEAN today to prove learning edge mathematics correct. Google LEAN and mathlib.

comment 4y ago · link · parent

Not at all. See CompCert, seL4, F* (F-star) and Coq for examples of how it is done.

comment 4y ago · link · parent

Termination is undecidable in general but that is not a problem in practice. Proof assistants like Coq, LEAN etc. can automatically prove termination for most practical code. And if not, the developer has to prove termination by hand. Which is not hard in most cases I have encountered. And if you still can’t do it you simply add a “fuel” natural number counter that guarantees termination (exit when out of fuel).

comment 4y ago · link · parent

It turns out that you can write proven correct C compilers (CompCert), proven correct Operating Systems (seL4), and proven correct secure network protocols using proof assistants like Coq and F*. All of those proof assistants are using languages that are not Turing complete. You have to prove termination if the proof assistants can’t automatically prove it. So being Turing complete is not really necessary for writing complex software.

1628.

Ask HN: What was your worst microservices nightmare?

4 points · by mbrodersen · 4y ago · 3 comments

comment 4y ago · link · parent

You are right. IMHO there is zero justification for making any application that complex.

comment 4y ago · link · parent

30 microseervices? Seriously? What on earth is the justification for having that amount of complexity? I have worked with very complex, very large monolith and client/server applications for 25+ years. And I never had trouble maintaining the code or add functionality. My guess is that using microservices was basically an excuse to rewrite the application? And that rewriting it to a new cleanly designed monolith might have been a better choice. Using “advanced” technologies like Modules and Libraries. A friend of mine has taken over a legacy (20+ years) 100+ microservices application. And it is an absolute nightmare. The complexity of building and deploying it is the worst I have ever seen. 10x worse than then worst monolith I have ever worked with. Debugging is a nightmare. Synchronisation issues makes auto testing almost impossible. The only good thing is that all the microservices are written in the same programming language. Imagine if 5+ different languages and build systems were used instead? The complexity would have been out of this world.

comment 4y ago · link · parent

Does the meeting move a revenue generating project forward or solve a customer issue? If not then it is 100% cost. BS feel good ideas like “coordination”, “alignment”, “transparency” and pretending to include people in the decision process has zero value unless it results in progress on revenue generating projects. The more people you include in a decision the slower you make progress. The sooner you make progress the sooner you get feedback and learn how to improve. The least productive and unsuccessful companies I have worked for spend most of their time on exactly the BS ideas you mentioned. The most successful companies I have ever worked for spent zero time on “coordination”, “alignment” etc. They were too busy killing the competition in the market place.

1632.

The Dafny Programming Language(microsoft.com ↗)

3 points · by deterministic · 4y ago · 1 comment

comment 4y ago · link · parent

Agree. Do the same with meetings. How expensive is this meeting? If the meeting takes an hour then the cost of the meeting is the sum of the hour rate of the people participating. Then ask if the meeting will generate enough additional revenue to pay for itself?

comment 4y ago · link · parent

Absolutely. State Machines are easily modelled in pure math. TLA+ is but one example of this.

comment 4y ago · link · parent

> Math cannot modify the value of a variable--either global or local. It cannot mutate an element in an array.

Computer scientists do this all the time. You most definitely can model state, side effects, non-determinism, IO, random acts of God etc. using pure math. TLA+, Coq, Isabell/HOL, LEAN etc. are proof assistants that are routinely used to do exactly that.

comment 4y ago · link · parent

Accept that what has happened to you in the past can’t be changed. So instead focus 100% of your energy on what you can do now and in the future to improve your situation. You might not succeed. But it is still the best way to live your life.

comment 4y ago · link · parent

Do we really need yet another Database? Seriously? Databases seems to be the new Bitcoin when it comes to getting VC funding. I expect 95% of those new Database startups to fail the moment they run out of VC funding. So why would I invest in any of them, not alone make my code depend on them, when there are so many already established successful Databases out there I can use instead with less risk? Also, are they using tools like TLA+ or Coq/LEAN/HOL to prove the code correct? Now THAT would have been interesting and noteworthy.

comment 4y ago · link · parent

Yes. It is absolutely needed for high performance computing. Carefully controlling memory layouts down to the bit level is key to making code run fast on modern CPUs. There is a reason why C++ absolutely dominates the AAA game industry for example: every millisecond counts.

comment 4y ago · link · parent

I got my MSc in Computer Science from a top University in Europe. 50% of students at the University dropped out within 6 months because of how hard it was. The University didn’t care because it wasn’t paid per student. It set a high bar and if you couldn’t handle it too bad for you. A few friends from my University studied computer science at MIT for a year. They reported back that MIT was way easier than our University. So I concluded that at least some prestigious well known Universities are simply better at marketing themselves than others :) And hey my University degree was free. Which was nice. It probably also explains the high bar: No pressure to make sure everybody graduates. If you can’t handle the heat then you are out.

comment 4y ago · link · parent

Agree. I have worked with developers from well known prestigious universities from all over the world. And they were not smarter than other people I have worked with from less known universities. Just more in debt :)

comment 4y ago · link · parent

Here is what I did when I had to create a fairly complicated web application with no prior experience in web development (but 20+ years of developer experience in other environments): I started by learning the basics: HTML, CSS and JavaScript. Without relying on any build systems or packages. And only then adding a build step or package if it really absolutely was worth it compared with writing a bit of extra code myself. It worked like a charm. I completed the project in a few months with very few dependencies. And the build “system” was simple. Which should be kinda obvious when you think about it: Every build system or package you rely on will become a liability and a major pain point down the road. Guaranteed. So the less you rely on external tools/packages, the more stable your code will be. And the more you understand the basics, the more you are able to fix problems with code you didn’t write yourself. The downside of course is that you have to invest more heavily in the basics (HTML,CSS,JS) but that is a good thing. The time you spend becoming an expert in fashionable build tool X or package Y is a waste of time. Something else will be more fashionable tomorrow so your hard earned expertise is wasted. It is a bad investment compared with deeply understanding the foundation (HTML,CSS,JS).

comment 4y ago · link · parent

Yep exactly right. Do as much as you can with plain HTML, CSS and JavaScript. Learn the basics without depending on any packages. And only then maybe add a package if it really absolutely is worth it compared with writing a bit of extra stuff yourself. Every build system or package you rely on will become a liability and a major pain point down the road. Guaranteed.

comment 4y ago · link · parent

The only process/structure you need for any size software project is a prioritised task list + no interruption of tasks already started. That’s it.

comment 4y ago · link · parent

Why do you think you have to be productive all the time? What a strange idea! Isn’t the point of working that you can then afford to kick back and do whatever you want outside of work?

1645.

The F* Programming Language(fstar-lang.org ↗)

36 points · by deterministic · 4y ago · 5 comments

comment 4y ago · link · parent

Foxconn is not a US company. So it can in practice completely ignore any rulings by US courts.

comment 4y ago · link · parent

I think you have been unlucky. I have worked with more than one 10x developer. They do exist but are not common.

comment 4y ago · link · parent

I have worked with more than one 10x developer. They didn’t work harder than anybody else. However they consistently made everybody in the company way more productive by simplifying things and resolving issues that nobody else could resolve. One of them single-handedly maintained a very large complex C++ library used by other teams. And he had zero bugs in production for years. His test suite was that good. He spent almost 95% of his time adding features instead of fixing bugs. He ended up maintaining two projects larger and more complex that projects maintained by whole teams and still had time to jump in and help teams that got stuck when needed. Another one unblocked a team that was stuck for 3 months making zero progress in a single meeting. And none of the 10x developers were assholes. Easy to talk to and always eager to learn how to do things better. Respect!

comment 4y ago · link · parent

A friend of mine joined a new company and within one week solved a performance problem that the company hadn’t been able to solve for years. It allowed the company to sell a $10 million solution to a customer. So I guess he delivered way more than 10x in just one week :)
1
545556
116