Hacker News new | past | comments | ask | show | jobs | submit | hvasilev's comments login

Number of different languages used in the repo: 16

Lines of code in the repo: 276969

https://pastebin.com/Fi97jHFB (as displayed by cloc on the repo)


Oh wow, that is really bad. Like 10 different technologies and at least 2 programming languages for a soldering iron firmware.


Why is that bad? It's possible that it's sloppy or lazy, but it's also possible that the author has carefully considered their options and is using the best tools (or their preferred tools) for the job. As described elsewhere in the thread, a soldering iron does more than just get hot, and as described in the readme, the project has accumulated a lot of functionality.


because it is unreadable and unmaintainable with all of these dependencies. Even in the description it says that it spiraled out of control at some point

"Originally conceived as an alternative firmware for the TS100, this firmware has evolved into a complex soldering iron control firmware."


That doesn't imply anything is out of control. How do you know it's unreadable and unmaintainable? Just browsing the repo it seems pretty under control and organized to me. Firmware projects tend to get complicated, see also QMK for keyboards.


Well, it is unmaintainable, because maintaining this set of dependencies is absurd for what this firmware is and it is unreadable, because I tried to read it and lost interest in a few minutes later, because of all the bullsh*t.


This seems a bit more like a "you" issue.

I dug through it and even compiled it quickly without an issue. The code looks clean, and well organized, and even supports multiple languages.

Just because code isn't PHP, python, or "hello world", doesn't means that it's absurd and unmaintainable. Especially when you have the attention span of a may-fly and declare it to be "bullsh*t" after a few minutes


I don't think it is a "me" issue. On the contrary, I think this project has a lot of issues similar to what contemporary modern web development has. Generally firmware engineers know not to do this kind of stuff, since we have a highly derivative work that spans across decades.

I'll give you an example - because of chip shortages I had to redo a couple of devices and their firmware for the past few years. I had to dig into code that hasn't been touched for 12 years on more than one occasions and I had no issue compiling it more than a decade later. The reason why is because people weren't trying to be fancy and they kept the dependencies to a minimum.

Imagine if you stop pumping oxygen into this project for a month...


This is a project which builds firmware for multiple devices and processor architectures, supporting developers running various operating systems locally, and includes support for documentation generation and firmware localization. It doesn't sound too strange to me that such a project includes a decent amount of tooling to ensure that compiling things is accessible for a layperson, and ensure a healthy influx of community and corporate contributions which don't diminish software quality. None of the dependencies mentioned in the Dockerfile [1] really seem out of place, to me, and I don't think the documentation generation or checkstyle packages are critical to compiling the firmware.

Besides, you can always treat a built Docker image as a stable toolchain archive if that's a concern; there's little reason to assume that it won't work 12 years into the future as - as far as I can tell - none of the software relies on it being run inside a Docker container.

[1] https://github.com/Ralim/IronOS/blob/80c4b58976268849b6d1c8d...


> This is a project which builds firmware for multiple devices and processor architectures, supporting developers running various operating systems locally, and includes support for documentation generation and firmware localization.

exactly the source of the issue. The scope of the project is just preposterous for what it is. I'm not sure what the proportion between boilerplate and actual useful functionality would is, but from the little that I saw it is outrageous.

> Besides, you can always treat a built Docker image as a stable toolchain archive if that's a concern; there's little reason to assume that it won't work 12 years into the future as

I heavily disagree with this assumption and the rest of the assumptions related to the stability of the dependencies.


The scope of the project is for the project to decide. It seems that 168 contributors and thousands of users seem to disagree with you here.

I'm not really sure what fewer dependencies you are used to other than a compiler, make, a scripting environment to orchestrate things (bash) and some (other) scripting environment to cook assets (Python3). I suppose that that last bit is something you're not used to in a more embedded world, but in the world of user-facing tools with UIs, it's really not uncommon at all to have a dependency on some font library or internationalization library so that you can generate an image or display some text. The latter of which is presumably fairly important, given that the users and hardware manufacturers that this project supports aren't based out of locations where English is the native language. I'm not sure localization can be pulled out of scope, because of that.

> > Besides, you can always treat a built Docker image as a stable toolchain archive if that's a concern; there's little reason to assume that it won't work 12 years into the future as

> I heavily disagree with this assumption and the rest of the assumptions related to the stability of the dependencies.

Docker images quite literally contain an entire (userspace) root filesystem. As long as you have an existing Linux installation on an x86 processor, a Linux kernel that didn't cause any breaking changes compared with the one that was used when the image was built, and some way of extracting a gzipped tarball, you can take the image that you previously built 12 years ago, extract its contents, and run all of the tools (gcc, Python3, make, bash) embedded within outside of Docker, without any dependency issues because all of the dependent libraries can be found within the image already (if they weren't in there, the project's CI builds would not work at all!).

You can verify this quite easily: install Docker, then run `docker pull ubuntu:latest; docker save --output test.tar.gz ubuntu:latest`.

I'll agree with you that if you are a user that stumbles upon this project 12 years from now (assuming they ceased development today) there are likely some challenges as you'll have to source the dependencies from somewhere and the repository URLs used today may no longer be available by then (most projects probably suffer from this). But if today someone builds the IronOS development image from the Dockerfile and saves it, I really don't know what'll have to happen for it to be impossible to get the compiler and other tools contained within to run on supported hardware in 12 years.

EDIT: Imagine what the project owners would have to do to do the same things they're doing now (building documentation, cooking required assets) but without relying on third party tools or programming languages other than C. They'd have to spend time writing font parsers, documentation generators, build scripting tooling, and much more! In a sibling comment you mentioned that "it seems to me that at some point this industry stopped trying to solve real issues", but I'd argue that the project pulling in the scope of building those tools to avoid dependency issues is exactly that: them solving issues that is not within their scope or merit to solve.


I'm asking you what do you think about it, not what the devs think about it. Let me phrase it differently, there are a total of 16 languages and 276969 lines of code in the repo for a "soldering iron firmware"


I'm not sure where you get that language statistic from. I'm going to assume whatever tool you're using thinks that "JSON" and "YAML" are languages, to which I respond that they're not or at least not as significantly so as a programming language with its own paradigms, libs and tools. The repo in question is mostly C/C++ with a relatively small amount of other stuff to provide tooling support, and the languages used for that are really not all that problematic, difficult to understand, or unsupported.

As far as LOC goes, I know well enough that it's a meaningless statistic that has very little practical use. I've written 34 lines of JavaScript that were as meaningful as 25k lines of C, but those lines of JS were obviously interpreted on an engine that's millions of LOC.


> is because people weren't trying to be fancy and they kept the dependencies to a minimum

I've been in professional development for 25 years now, and I've heard people say this before NUMEROUS times.

You know who the people who say this are?

People who live and breathe Dunning-Kruger and in reality, just unable to keep up and being unwilling to learn and evolve.

Usually this is someone that likes to talk the talk, but put something that actually requires critical thinking and it's instantly broken, the libraries are broken, the language is broken. Don't worry, the developer isn't the problem, it's all the tools and scaffolding.

And I've hired and fired at least 100 developers over the course of my career in Fortune 100 companies so I've seen them all.

Whatever. Your opinion vs my opinion.

Nobody said you had to run this on your soldering iron. And it's not like it's supporting a huge catalog of devices. It's just an alternative option for tinkerers.

> Imagine if you stop pumping oxygen into this project for a month...

And nothing will change... This is a simple OS for a $26 soldering iron with what amounts to a custom form-factor SBC.

But don't worry, hvasilev knows everything about development and this project is bullsh*t.


i honestly didn't read half of this post. i have no interest in engaging into this sort of conversation. have a nice day.


"You know who the people who say this are?

People who live and breathe Dunning-Kruger"

Or those of us that actually paid attention to good coding practice in the 90s.

Try again when you've got 4 decades under your belt.


lol, are you seriously trying to state that there's been zero evolution in coding practice in 30+ years?

Do you still using CVS as well? Is OOP the only way to live in your world? Java+Flash seems like a great way to make interactive web pages. Let's concat together some sql with user input and pass it straight into the database.

Gotta ship that project with some Extreme Programming. Do you still believe a programmer with 20+ years of experience but can't navigate modern tools, scaffolding, and methodology and hasn't grown and evolved their skills is more valuable than a programmer with 2 years of experience?

I am a hack programmer at best and I can admit that. But I've also worked with and managed the best and the worst of engineers and it takes about 5 seconds to smell out the BS and the people who are locked into their ways.

Yeaaaaah.... read what I wrote again repeatably above until you don't represent it.


First you pointed out your extensive experience as a basis for your argument and now when you realize you're completely out of your depths, you call us "locked in their ways" and call yourself "I am a hack programmer at best and I can admit that".

Fun fact: I'm actually not really seeing this "locked in your ways" as people get older, I see people asking about the cost-benefit of using a technology before using it a lot more. Just because I got curious, I took another look at the repo, there was a few libraries that I've never seen, but generally I'm up to date with what is going on (might have not used anything in production, but at least out of curiosity - I'm familiar). As I pointed out elsewhere, there are just literally 16 different languages used in this project and over 270k LoC.

I'm way past the stage of my life in which I feel a need to have a dick measurement contest online with random people about my experience, where I work and how many devices do we sell per year.

I think you might need emotional support in your life, take care.


So now you can take the time to read? And engage? because you said you don't do that.

> First you pointed out your extensive experience as a basis for your argument and now when you realize you're completely out of your depths, you call us "locked in their ways" and call yourself "I am a hack programmer at best and I can admit that".

I pointed it out as a basis for how transparent the behavior is, not as my capability as a programmer. Because I'm not the one who claimed I can glance at a repo for 2 minutes and judge it to be bullsh*t. Nor see 270k lines of code and not see the extensive documentation, translations, etc

> I'm way past the stage of my life in which I feel a need to have a dick measurement contest online with random people about my experience, where I work and how many devices do we sell per year.

And yet, here you still are. Measuring away.


All that evolution means jack and shit when it's all done with almost zero thought to the OSI model. Hardware AND software both are horribly-guilty of this.

And we were screaming about this 30 years ago, when speculative execution was first a thing.

Now you have to have all this new stuff because you refuse to acknowledge the old stuff, and its problems, in the first place. And then you go on to repeat half the problems, and only bandaid the others. Memory safety.. pffft. Physics laughs at that notion.

I can tell you have very, very little experience.


Really the code is C++ on a C RTOS (the same compiler toolchain), and the Python scripts are there to generate fonts and handle build jobs, and don't get loaded into the actual iron. Last time I checked the code is built off blocking functions rather than state machine objects in an event loop, which I'm not sure how I feel about in an interactive GUI.


what do you think is the proportion between boilerplate and tooling to actually useful functionality?

Given this ratio what do you think about the scope of this project?

I'm not sure why or when, but it seems to me that at some point this industry stopped trying to solve real issues.


You open source guys need to figure out a way to charge people for the value that you provide. You ran the experiment for a very long time and it looks like this "beggar" model really doesn't seem to be working for the vast majority of your projects.

Take money, don't wait for people to give you money for the free value that you provide.


This 100%. I run a German limited company (GmbH) and I can't just send money somewhere without a proper invoice. I've even had issues with paid services (think VPN providers etc) that don't send out invoices, so then I'm stuck with an expense that I can't deduct as a business expense. Make sure you can issue correct invoices, and let potential customers know upfront!


I’m actually optimistic about the progress & shift in behaviour. There’s a few companies that are setting a clear example & leadership in this space like Sentry, sourcegraph & cash app who genuinely want to help improve the ecosystem.


I'm sure plenty of folks would be happy to send invoices to people that want them :)


I think paid feature requests/support is way to go.


Yea, me too. I don't really understand people that say that clean code is easier to understand.


The way that mammals learn is by play. Seems like the more the abstract something is, the harder it is to play with it, since it is by definition non-concrete. In order to play with these concepts, you have to do that in your head, which is non-intuitive (or maybe even impossible) for a large part of the population.


How did you know it was in Webkit or Blink? What was your thought process that lead you to this conclusion? Was it prior knowledge?


I tried to think of a less-unsatisfying answer, but it was just prior knowledge. All the major browsers use Webkit or a fork of WebKit, and WebKit had to be the thing that lays out the DOM since it’s not chrome-specific. (If you were looking for something specific to chrome, it’d probably be a lot harder to find. Or at least for me to find.)

The other comments are good too: try searching the metadata for the code, like git logs, pull requests, etc.

I suppose a new age solution might also be to type “// The DOM layout algorithm:” into Copilot and pray.


There are just so many of these fun AI-related concepts that seem really cool and you get the chill that they will take over the world some day.

Decades pass and you realize they either have little to no application or are incredibly niche :(

Too bad that "solution in a search of a problem" is generally bad approach to problem-solving. I wish our industry was more fun as a whole.


Most of the time, these things are resource hogs arriving way before their time to shine, either needing Moore's law to catch up the hardware, or some nerd to wrestle with the combinatorial explosion and win. Transformers can be seen as a variation on Markov chains, but the innovation of attention mechanisms means you can use hundreds of thousands of tokens and thousands of tokens in sequences without the problem space going all Buzz Lightyear on you.

https://www.zabaware.com/ultrahal/

Ultra Hal was a best in class chat bot when fixed response systems like Alice/ AIML were the standard. Ultra Hal used Markov chains and some clever pruning, but it dealt with a few hundred tokens as words and sequences only 2 or 3 tokens out. It occasionally produced novel and relevant output, like a really shitty gpt-2.

I think we may see a resurgence of expert systems soon, as gpt-3 and transformers have proved capable of automating rule creation in systems like Cyc. They've already incorporated direct lookups into static databases gpt / RETRO type models. Incorporating predicate logic inference engines seems like the logical and potent next step. GPT could serve as a personality and process engine that eliminates the flaw (tedium) in massive, tedious, human level micro-tasking systems from GOFAI.

It's worth going through all the literature all the way back to the 1956 summer of code and hunt for ideas that just didn't work yet.

https://en.wikipedia.org/wiki/Dartmouth_workshop


...Markov Chains (via MCMC) underly most Bayesian inference problems, and pretty much all stochastic dynamical systems models are based on Markov Chains.


Markov chain Monte Carlo is incredibly useful and widely applied.


Not to mention that the entire class of Markov Chain Monte Carlo techniques only form a subset of general uses for Markov chains.

Markov chains form the basis of n-gram language models, which are still useful today.

Markov chains are also the basis of the Page-rank algorithm.

Hidden Markov Models (which are just an extension of Markov Chains to have unobserved states) are a powerful and commonly used time series model found all over the place in industry.

In the pre-deep learning model Markov chains (and HMMs) in particular had very wide spread usage in Speech processing.

They are probably one of the most practical statistical techniques out there (out side of obvious example like linear models).


Not to mention, it was less than a decade ago that one could have said about neural networks "Decades pass and you realize they either have little to no application or are incredibly niche".


To give an example: Prediction by Partial Matching is basically a Markov chain in disguise, and an incredibly powerful way to do compression that beats most other forms of text compression (at the price of having a lot more memory overhead)

[0] https://en.wikipedia.org/wiki/Prediction_by_partial_matching


Aren't Markov chains how predictive typing usually works? (or worked, I suppose the big players are probably using some sort of neural net now)


The issue with the world view that "a job is an exchange of services" is that it is unsustainable. The sheer time magnitude of work - 40 hours a week + commute for many decades dictates that it is a very significant portion of your life. On top of that on a day-to-day basis the timeslot itself between 9/5 is the best part of the day for the vast majority of people.

Seems like in order to have a deeply fulfilling life you need to have a job that you like and find it deeply meaningful. There is just no way around it, it is too much.


The essence is: https://github.com/google/log4jscanner/blob/main/jar/jar.go

this is the decision logic:

func (c *checker) bad() bool {

return (c.hasLookupClass && c.hasOldJndiManagerConstructor) || (c.hasLookupClass && c.seenJndiManagerClass && !c.isAtLeastTwoDotSixteen)

}


It is a lot of code for just that.


I’d argue that the convenience of this tool isn’t just the fact that it can tell a class/jar is “bad”, but the convenience of being able to automatically scan the filesystem to do that.

And most of the code I see is about walking the filesystem, unzipping jars, walking the files inside the jars.

Most codebases have this kind of plumbing all the time.


the story of browsing through code: "I'm wasting my time reading this", until you read the 3 lines that actually matter.


I'm arrogant beyond belief and a self-absorbed asshole. I'm absolutely comfortable with that and feel no need to change. I can point out multiple situations in my personal life where this has been massively advantageous for my own psychology.

By the way, some of the most valuable people in our societies are borderline horrible arrogant narcissists. I don't see people not using the knowledge that Isaac Newton shared with us, because he was a horrible person... I honestly think that if he saw a shrink and worked on "his issues" (by today's standards) he would have lobotomized himself.

Nietzsche had a good intuition about people that optimize for full manifestation of the self in reality, but was kind of naive what qualities these people would exhibit. It is the entire package, not only the "good parts" (by today's standards)


>I'm arrogant beyond belief and a self-absorbed asshole. I'm absolutely comfortable with that and feel no need to change. I can point out multiple situations in my personal life where this has been massively advantageous for my own psychology.

I'm a thief. I'm comfortable with that and feel no need to change. I can point out multiple situations where this was advantageous to me.

>By the way, some of the most valuable people in our societies are borderline horrible arrogant narcissists.

Nah, this is just the standard /r/iamverysmart drivel: you basically are so superior to everyone else that any interaction with the inferior masses leaves you so annoyed that you have to lash out like an asshole. Probably popularised by depictions of the """genius"" like Sheldon on Big Bang Theory, Zuck on Social Network, or that Steve Jobs flick.

In reality unless you truly are massively wealthy or influential nobody will stand for your bullshit. The most competent and intelligent people I've found are also nearly always the most humble and the best communicators.


Newton died with no friends, he was celibate his whole life, and he never travelled farther than about 100 miles from where he was born. He was rightly recognized for his contribution to math in his 20s, but by the time he was in his 30s he'd removed himself from the scientific community and spent all his time studying alchemy and the bible.

You believe that it was necessary for him to be a dick in the pursuit of genius; I think the outcome of his "full manifestation of the self" meant that society benefited from 10 years of his singular effort and then lost out on the next 50 years because no one would work with him, and his peers actually laughed at him for his (entirely wrong) approach to the theory of what light is. Boyle and Hooke accused him of stealing their ideas on optics.

The fact Newton was an asshole, and people let him be an asshole, robbed us all of 80% of what he might have achieved if he'd been a bit nicer.


In fact he became President of the Royal Society and Master of the Royal Mint.

He rescued the Royal Society from bankrupcty and also worked with the best equipment makers of the day to improve experimental science.

At the Mint he was responsible for the gold content of the coinage and using science and design to limit counterfeits.

There was quite a bit more than "studying alchemy and the bible" because "no one would work with him."


You're saying that if he was not the asshole that he was, he would have achieved more. I'm saying that if he pretended not to be the asshole that he was, he would have achieved nothing.

You cannot go against your own nature. It requires too much energy and does not work, it lobotomizes you.


You might be right. You might not. We have no way to know. Back in Newton's day a person could make huge leaps alone. Today I think there are few people who can make breakthroughs on their own now, or even do great work without collaborating. Maybe being an asshole was OK 400 years ago but it isn't now.

Also, suggesting it's OK to emulate Newton when you're not a genius is likely to have a worse outcome.


The point is that you should not emulate anyone and that you should be yourself, no matter what society tells you.


If you're really convinced that there's a "true" version of yourself, you should read the 70s cult classic "The Dice Man" by Luke Rhinehart. While not exactly earth-shattering prose, and while also following a general plot arc of increasingly graphic and violent sexuality, in the right setting it can be a deep reminder that there is not a single version of you. You make choices, sometimes arbitrary, sometimes circumstantial, sometimes due to other people, and those choices can illuminate entirely different aspects of who you are.


You are saying two conflicting things here:

- People should not emulate anyone.

- People should emulate you. (Think about how fundamental the change from emulating to non-emulating is for all their talking/reading/thinking patterns. I don't see how else can you reboot your personality short of emulating someone.)


You're saying that your nature predestines you to be in a particular way, and that being an asshole is just something that you are.

In reality, your way of being is shaped by your life learning, of which your way of relating to those around you is a part.


Kids come with different personalities right out of the box, ask anyone with more than one kid. You've bought into some liberal propaganda that people are fully malleable objects. We are not. It is a combination between nature and nurture. I personally believe it is significantly more "nature" in this case.

There are certain aspects of your personality, like "arrogance", that the society might find unacceptable. That doesn't mean that they are bad for you or that you can change them.


People are pretty malleable though, is the thing. We like to think otherwise because it’s cognitively simple to think people (and ourselves) are static objects as identities that don’t change over time. In fact, people are very dynamic and change dramatically over time in response to their environment, self-inflicted or not. It can be anything from sudden trauma causing drastic personality changes, puberty, or rigorous work at changing one’s maladaptive thinking patterns.


Of course they are bad: you will be shunned by peers, you will have stunted communication skills. Interpersonal relations and communication is a critical skill for any endeavor where you don't work alone (I've no idea what is it that you do).


I think he's saying that Newton should have chosen not to be an asshole.

I don't know the history, so I won't speak to whether Newton was, in fact, a jerk.

But it is possible to recognize the asshole inside yourself and change. At least, I've been doing that in the past two years.

My life has been much harder as a result, but it's also clearly benefited both me and the people around me.


> By the way, some of the most valuable people in our societies are borderline horrible arrogant narcissists.

I don't know if there is any data/research on being successful or valuable requiring an arrogant narcissistic personality. I believe it doesn't. If anything, such people became successful despite having such difficult personalities.


The "difficult" in difficult personality is not for themselves, it is for everyone else.

It is not necessity for being successful or valuable, but it is undeniable that people like that exist throughout history.

At the most fundamental level: It is arrogant to believe that from purely biological point of view, an individual would posses qualities like "arrogant" that are of no possible value.

Societies need to believe certain things to function. You cannot have a society where each individual is like Isaac Newton. I'm sure that if you asked the people that were knew him, they would say that "one is more than enough..."


>It is arrogant to believe that from purely biological point of view, an individual would posses qualities (like "arrogant") that are of no possible value

Why?


Narcissistic people are more charismatic st first. They are good at attracting attention to them and get celebrated even if they stole half the ideas.

Creating a lot and getting a lot of attention are two different things.


Isn't arrogant and narcissist describing two completely different things? Narcissism is social. You can be an arrogant asshole and become and hermit. A narcissist wouldn't choose to be a hermit, because that person feeds off interactions with others.

My problem with the idea of being "arrogant and a self-absorbed asshole" is that it smells like identity. Taking on strong identity can be a problem, as we see with identity politics. I feel a better path through life is to keep identity small and be more creative on being adaptive.

As I said in another comment, the author is going into the party in a frame of "seeking intellectual conversation." Another person at the party may have attended in the frame of "seeking a hook-up." Both may have been similarly disappointed. A better approach is to be be creative and adaptable. We have forgot how to play.

I feel that having a default frame would be problem for me. Being adaptable is just more fun. Being arrogant may be effective in certain situations, but a problem for others. One of my favorite playgrounds is the British pub cultural thing of "taking the piss." That's where someone you're talking to at the bar just starts ripping into you. I LOVE that, and I usually surprise them at being better at it than they are. An arrogant frame in this situation would leave you wide open.


Newton wasted a lot of time on pursuits such as alchemy and mapping out the geography of hell. Not to mention surely some of his contemporaries would have came across many of his discoveries- the much better socially-adjusted Leibniz did, after all.


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

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

Search: