validators
is a shitty name for something that actually does type conversion.
validators
is a shitty name for something that actually does type conversion.
People throwing thrash on the way usually is a sign of not enough trash cans in an area.
No. I regularly see trash on the ground with sometimes as much as 5 trash cans in sight that are less than 20m away.
If you cut yourself with a knife, it might be your fault. And it might be that the knife is sharp on both sides and has no handle.
C) Write a highly specific, custom-tailored boilerplate generator that does 80% of the work and needs only a day or two to implement.
Coding must be a nightmare if you’re choosing programming languages at random 😱
But you must also be learning quite a lot.
Programs aren’t written by a single team of developers that speak the same language. You’d be calling a library by a Hungarian with additions from an Indian in a framework developed by Germans based on original work by Mexicans.
If no-one were forcing all of them to use English by only allowing English keywords, they’d name their variables and functions in their local language and cause mayhem to readability.
I can’t find the source right now, but I strongly believe that Steve McConnell has a section like this in one of his books where he quotes a function commented in French and asks, “Can you tell the pitfall the author is warning you about? It’s something about a NullPointerException”. McConnell then advises against local languages even in comments
I work in IT. We get notified when people leave.
The cruelest thing in my company is when we get to know before the person in question…
maybe everyone here is just a rude little shit.
Or maybe you’re just a snowflake that can’t handle criticism.
Is this not rude:
I checked the code and I’m appalled. There are more BLOBs than source code
No. The commenter is voicing their own feelings and explains why they have them. There is neither blaming nor rudeness here.
And this:
I understand that removing BLOBs isn’t a priority over new and shiny features. But due to recent events, this should be rethought.
It would have been nice if you had explained why you think this is rude. The author expresses understanding that the maintainers’ priorities don’t align with the author’s. This seems to be an uncontroversial statement to me.
Then the author explains (I agree, it’s more a hint than an explanation) why they think the priorities should be changed. In my view their argument is sound. Again, there is no blaming or rudeness here.
They should have opened with a complement
I assume you mean “compliment”.
I’ve often heard of the “sandwich technique” – start with a compliment, then voice criticism, end with another positive thing. I find this is an appropriate procedure when voicing open feedback, that is, good things and bad things. However, this is a Github issue. Its whole point is to point out a perceived problem, not to give the maintainers a pat on the back or thank them.
I cannot fathom what in this issue description gives rise to your concern. It’s worded very calmly, clearly explaining why the author thinks these BLOBs shouldn’t be there, expressing an understanding that it’s not a top priority and even closing with a thank you.
You must have exceptionally competent first-level support.
There are no inherent “rules” to language, either, but when you don’t followthemthingsgetmessyandyou’reannoyingforeveryoneelese.
Thank you for linking the blog posts. They are a really good deterrent from Clean Code. I once thought I’d read it, but Fowler’s advice really is stupid.
In case you’re wondering why I replied three times: “Do one thing” :)
Exceptions are just bad. They are a separate, hidden control flow that you constantly need to be wary of. The name itself is a misnomer in my opinion, because they’re rarely exceptional: errors are not just common, but an integral part of software development
They may be a part of software development, but they should not be common during the normal execution of software. I once read the hint, “if your app doesn’t run with all exception handlers removed, you are using exceptions in non-exceptional cases”.
Throwing an exception is a way to tell your calling function that you encountered a program state in which you do not know how to proceed safely. If your functions regularly throw errors at you, you didn’t follow their contract and (for instance) didn’t sanitize the data appropriately.
Errors as values are much clearer, because they explicitly show that a function may return an error and that it should be handled.
I disagree here. You can always ignore an error return value and pretend that the “actual” value you got is correct. Ignoring an exception, on the other hand, requires the effort to first catch it and then write an empty error handler. Also (taking go as an inspiration), I (personally) find this very hard to read:
res, error = try_something()
if error {
handle_the_error(error)
return_own_error()
}
res2, error2 = try_something_else(res)
if error2 {
handle_other_error(error2)
return_own_error()
}
res3, error3 = try_yet_something_else(res2)
if error3 {
handle_the_third_error(error3)
return_own_error()
}
return res3
This code mingles two separate things: The “normal” flow of the program, which is supposed to facilitate a business case, and error handling.
In this example, on the other hand, you can easily figure out the flow of data and how it relates to the function’s purpose and ignore possible errors. Or you can concentrate on the error handling, if you so choose. But you don’t have to do both simultaneously:
try {
res = try_something()
res2 = try_something_else(res)
res3 = try_yet_something_else(res2)
return res3
} catch (e) {
// check which error it is and handle it appropriately
throw_own_exception()
}
Functions should be small and do one thing […] you end up with a slew of tiny functions scattered around your codebase (or a single file), and you are forced to piece together the behaviour they exhibit when called together
I believe you have a wrong idea of what “one thing” is. This comes together with “functions should not mix levels of abstraction” (cited from the first blog entry you referenced). In a very low-level library, “one thing” may be sending an IP packet over a network interface. Higher up, “one thing” may be establishing a database connection. Even higher up, “one thing” may be querying a list of users from the database, and higher up yet again is responding to the GET /users
http request. All of these functions do ‘one thing’, but they rely on calls to a few methods that are further down on the abstraction scheme.
By allowing each function to do ‘one thing’, you decompose the huge problem that responding to an HTTP request actually is into more manageable chunks. When you figure out what a function does, it’s way easier to see that the function connectToDb
will not be responsible for why all users are suddenly called "Bob"
. You’ll look into the http handler first, and if that’s not responsible, into getUsersFromDb
, and then check what sendQuery
does. If all methods truly do one thing, you’ll be certain that checkAuthorization
will not be related to the problem.
Tell me if I just didn’t get the point you were trying to make.
From your description this sounds more like a job in IBM’s R&D department than a game
No, it does.
In Mint: Externen Monitor anschließen geht nur, nachdem man Treiber nachinstalliert hat. Zwischen externem Monitor und internem ist eine Lücke von geschätzt 800 Pixeln. Skalierung für jeden Bildschirm separat einstellen, geht gar nicht. Externe Lautsprecher brummen auf voller Lautstärke, wenn kein Ton abgespielt wird, was ich bisher nur nach Login und vor Logout reparieren konnte.
Ubuntu: WLAN geht nicht
Manjaro: Hier sind 500 Paket-Updates, finde selbst raus, wie du die Konflikte reparierst.
Solange so ein Krempel nicht „einfach funktioniert“, ist Linux kein Herr und Erlöser.
Infuriatingly long and badly communicated Windows update today, at work, which I wanted to install during the break, only to find that the laptop crashed midway and I still had to do the update when I came back.
Why would python even expose the current line number? What’s it useful for?