HNHacker News
TopNewBestAskShowJobs

tored

1,022 karma · joined October 29, 2020

submissionscomments
tored··on How to write unmantainable code (2015)
T_PAAMAYIM_NEKUDOTAYIM
tored··on Checked C
Correct me if I’m wrong but didn’t a few BASIC dialects, like QuickBasic and Turbo Basic, also support that back then?

Truly bizarre that we ended up with C, still feature incomplete compared to what was available at the time.

tored··on Ask HN: Is this secure? Hot updates using arbitrary PHP code execution.
Perhaps reach out to Paragon Initiative Enterprises https://paragonie.com/

They do a lot of security related work for PHP. It was them that added libsodium cryptography library to PHP. They have a few well known open source projects about cryptography and secure practices.

https://paragonie.com/software

tored··on Ask HN: Anyone tired of everything being a subscription now?
IntelliJ is still getting worse regardless of their subscription plan (and it is getting more expensive).

I think it took the wrong turn around a year ago at the same they changed the splash screen (that is why I remember it), after that the updates have been worse.

tored··on Ask HN: Anyone tired of everything being a subscription now?
Spotify, IntelliJ (Phpstorm), Postman is definitely getting worse.
tored··on Where did software go wrong? (2020)
Natural order is not necessary something we want, it can be, but not always.

Capitalism would be fine with private monopolies for instance, but from a market economy perspective that would be bad.

tored··on PHP 8.2
> extremely common in the PHP community?

If I'm going to guess is that you have interacted with non-professional and/or beginner level PHP programmers, they could feel threatened becuase the only development skill they have is rudimentary PHP and you are asking them to replace that with something much more difficult. I have seen some of it myself, and it has always come down to lack of skill.

And this makes sense why you have encountered this within the larger PHP community, becuase PHP is an easy to learn beginner friendly language that is used by the majority of blog and forum systems, zero setup web frameworks, and all of it can be set into production on almost every server on earth. Thus there are many low skilled PHP developers, probably more than moth other languages.

And this is the lessons, it is important to understand that every community consist of large variety of disparate groups, especially within the PHP community, and it is up to you to learn to distinguish them. Unfortunately many are blind to this when it comes to the PHP community, outsiders may think the work I do professionally is the same as someone setting up blog for the first time, just because we use the same language. It would be same to think that the result of a first grader learning to write is the same thing as Tolkien's writings becuase both are in English.

tored··on PHP 8.2
What you should always do is to write your own code outside of the framework and pass in values or plain class objects from the framework to your code to avoid that the framework taints the entire project. One of the most common polluter is the ORM becuase it often passed to every layer of the application. And it is never too late to start.
tored··on PHP 8.2

  * function autoloading
  * typedef 
  * templating hooks for escaping output and such
  * better phpdoc, e.g define class without creating class, nested structures. 
  * inner class 
  * modules (instead of namespaces)
tored··on PHP 8.2
There is an error in the examples on this release page about traits with constants, it says that

return self::CONSTANT; // Fatal error

however that is actually allowed, what is an fatal error is

return Foo::CONSTANT; // Fatal error

compare

https://3v4l.org/dIeOk#v8.2rc7

https://3v4l.org/11of1#v8.2rc7

Prohibit direct access through a trait name

https://wiki.php.net/rfc/constants_in_traits

tored··on Show HN: A nice C string API
A year ago I picked up the BASIC dialect PureBasic. Pleasant surprise actually, the syntax of the PureBasic dialect is a bit archaic, but if you accept that it is much easier and faster to get anything done compared to C (and C++). Personally I find low level topics easier to grok in PureBasic than in C even though they mirror the same concepts. PureBasic has Unicode strings built in.

It is a bit shame that BASIC has such a bad reputation, there are many BASIC dialects that does the job well still today.

https://www.purebasic.com/documentation/reference/ug_string....

tored··on Show HN: A nice C string API
Another is Hollerith strings that was used by FORTRAN and TCP protocols.

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

tored··on 83% of Developers Suffer from Burnout, Haystack Analytics Study Finds
My homegrown conspiracy theory is that Agile was invented by project managers that wanted to constantly change project goals.

Broken pleb developer - Why are why yet again changing project goals? We already changed them last week after a long meeting.

Carefree Manager - It is Agile to adapt!

Core of Agile makes sort of sense, that you continuously involve the client and iterate thru the project to create a product that meet client demands. However that also assumes that you are working with clients that are competent, in the real world most clients are clueless. Now you have a clueless client and a clueless manager running the project to the torment of the developers.

In my own experience after working at different management positions (team lead, scrum master, senior developer, project manager, technical project lead, architect etc) is that the vast majority of developers, me included, are uninterested in project management, they just want to code. Thus when I run projects I run it as a dictatorship instead of a democracy (scrum) and give the developers the tasks that fit them based on their skill level. This requires some skill in understanding your developers needs, 1) that they feel that they make a difference, 2) that they have some freedom on how to solve each task, but within the constraints of the architecture and project. It usually works best for everyone involved.

If there are some developers that do enjoy project management (often they are knee deep into scrum theory and such) I handle them separately from the rest of the team and do some project management with them only. No reason to involve the entire team just because a single developer enjoy retrospect meetings. If there any valuable conclusions (rarely) you can introduce it to the rest of the team afterwards anyway.

Scrum and such theories assumes that every developer are equally engaged in the project, in reality that never happens because we have different personalities, different skill level and different priorities, thus making a developer to "freely" pick a task from a board of tasks is just nonsense. We all know in advance who will do what, it is just a charade. Same goes for planning tasks, if you have no idea how to implement a task you can't really help with planning it either.

The common timeboxed two week scrum iteration is probably one of the most common reasons why developers feel stress.

Morning meetings must have an agenda, a chairman and be timeboxed, otherwise it is a waste of time. Personally I find that asking what everyone is doing is a bit unnecessary, most people don't care and wont listen anyways. It tends to be better to use that meeting to inform what is happening next in the project.

Common among developers is that they are a bit socially inept, however many of the scrum ideas force them to into socially awkward situations, I view that as bad company policy.

Clients needs to be handled individually on case by case basis, you can't run an entire project management style based on the assumption that clients know what they are doing. Most clients will accept your decisions if you present them confidently, they view it as they pay a professional so solve their problem, similar how you would hire a carpenter.

tored··on 83% of Developers Suffer from Burnout, Haystack Analytics Study Finds
I largely agree but I would like to add that much software we developers work on today works against developer satisfaction.

Bizarre architecture choices based on trends, tedious build steps, complex development setups with hours spent on configuration, etc.

Software development has become a time sink into things that has nothing to do with the actual task at hand.

This annoys me somewhat more than a clueless manager, who can be forgiven for not understanding software development, because these software architectural problems is something we developers created, willingly.

tored··on Programming languages with small surface area
There are many BASIC dialects with a small surface area. The one I use is PureBasic, however it is commercial.
tored··on Reasons why Fortran is still used (2021)
How well does Fortran intermingle with other languages, like loading libraries (so, dll etc) or compile source as a library (dynamic or static)?
tored··on Sudo: Heap-based overflow with small passwords
From a security standpoint point you would want the opposite, the stricter doas on the more exposed servers and and the less strict sudo on the personal desktop.
tored··on The pool of talented C++ developers is running dry
I would suggest Pascal or a compiled BASIC dialect to learn those things.

The nice thing with these languages is that they are relatively small but still has these concepts, thus perfect for learning.

tored··on Tcl is faster than Python for database benchmarking
PHP is GIL-free too.
tored··on Vasa's sister ship Äpplet found
If you follow the excellent YouTube channel Drachinifel you will learn that many ships of that era (including WW2) had design flaws, like heavy rolling, flooding into compartments, breaking of the hull etc. This was the time before computer models and computer simulation.
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
No, not everyone involved, everyone that can’t afford the bill in Southern Sweden, it is not good for them.

Just because Germany destroyed their electrical system it should not mean that companies in Sweden should go bankrupt. Germany tampered with the EU market, they ought to pay fines.

tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
Not self sufficient enough and also depending on weather.

There will be much higher demand of electricity in the close future, e.g. battery factories requires a lot of it.

Carbon free steel is another, true is that some of it the involved companies will provide their own electricity production, but that will not be enough.

But there are also other industry that requires electricity for expansion like food industry, paper mills etc.

Another thing is that Sweden has an unequal distribution of production of electricity, a lot of production (hydro) is far north where fewer live, and little production far south where everyone live.

The nuclear reactors that were shutdown was all in southern Sweden.

It is hard to transport vast amount of electricity from north to south because of limited bandwidth but also because of the newly shutdown nuclear reactors, they provided necessary stability to grid, with them gone it made it harder to transport electricity from north to south.

Another problem is that because of the push on wind power and the shutdown on nuclear power, the electricity system has become much more weather dependent resulting in massive price spikes. That is generally bad for industry that want predictable prices.

This also has the consequence that the electricity price of the continent can infect the price in Sweden because Sweden is connected to the same grid. If temporary shortage in southern Sweden, then import of capacity from the continent is required but with that comes a higher price.

tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
Can’t be be build immediately.
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
It’s Time to Wake Up - The Currently Known Global Mineral Reserves Will Not Be Sufficient to Supply Enough Metals to Manufacture the Planned Non-fossil Fuel Industrial Systems

https://www.gtk.fi/en/research/time-to-wake-up/

"No matter what minerals will be needed, we will need large quantities of them as the renewable power sources like wind and solar, require extensive mineral resources to manufacture the infrastructure for fossil-free energy.

And there is a challenge. Given the estimated required number of Electric Vehicles (EV’s) of different vehicle class, it is clear that there are not enough minerals in the currently reported global reserves to build just one generation of batteries for all EV’s and stationary power storage, in the global industrial ecosystem as it is today."

tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
Sweden is net exporter of electricity over a whole year, but some days, depending on the weather, Sweden is a net importer in some regions.
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
What can be built now that displaces CO2 immediately?
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
Hydrogen. However electrolysis is still an immature technology and has massive energy losses in every step of the procedure. You can negate that somewhat if produce and store at the same location of the intended use, like providing electricity to a building with hydrogen tank, hydrogen that is generated by solar panels.

However this is of course not enough to run industries with high electricity demand, what people tend to forget is that one factory (like melting of aluminum) can consume more electricity in one day than an entire city in a year. For that you need nuclear power or hydro.

tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
In the direction the world is going, the breakdown of globalization, every country will be required to be self sufficient.
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
How are going to mine resources that doesn’t exist? There is not enough of the metals needed to go full renewable.
tored··on Sweden’s incoming cabinet says new nuclear reactors will be built
The winning proposal of referendum about nuclear power in 1980 never said anything about when the shutdown should be, that was something the politicians added afterwards. What it said was that shutdowns should be done as long it doesn’t undermine employment and welfare.

And because these shutdowns have radically increased electricity prices with unemployment as a result, thus both undermining employment and welfare, it actually violates what the winning proposal stipulated in the referendum.

Furthermore the tax on nuclear power was massively increased three times as consequence of influence of the two green parties, Center party and the Green Party, 2006, 2008 and 2015, and the same time subsidizing renewables, thus making nuclear power not economically sustainable. There was even a referendum in parliament about these latest shutdown with only one vote difference. No, it was intentional.

← PreviousPage 8 of 26Next →