|
except they still kind of poorly do it (namely error handling, which I'm still mad about because it still relies on the dev faithfully checking the error value in order to prevent careening into undefined states with your program)
|
# ? Aug 29, 2018 17:18 |
|
|
# ? May 22, 2024 09:22 |
|
i'm a pretty big fan of Swift-style error handling, although I'd prefer if the thrown error type could be specified. it's semantically similar to returning (value, error) in Go (since it's a natural representation of the NSError output parameter used throughout Apple's APIs) but it forces you to check the error
|
# ? Aug 29, 2018 17:23 |
|
I avoid these issues by writing flawless, perferct code every time. I don't know why you guys haven't thought of it.
|
# ? Aug 29, 2018 17:36 |
|
Peeny Cheez posted:I avoid these issues by writing flawless, perferct code every time. I don't know why you guys haven't thought of it. thanks for the tip, rob pike
|
# ? Aug 29, 2018 21:59 |
|
redleader posted:thanks for the tip, professor of my graphics class
|
# ? Aug 29, 2018 22:00 |
|
https://blog.golang.org/errors-are-valuesquote:The key lesson, however, is that errors are values and the full power of the Go programming language is available for processing them. throb pike
|
# ? Aug 29, 2018 22:44 |
|
Peeny Cheez posted:I avoid these issues by writing flawless, perferct code every time. I don't know why you guys haven't thought of it. I know this was posted in jest but this line of thought is just baffling to me, like sure okay let's pretend you actually write good code, let alone perfect code, there's -other poo poo your system is dealing with- that might cause errors you need to handle. ARGBHRWQHGEAHG
|
# ? Aug 29, 2018 23:19 |
|
no i wrote those systems too and they are also perfecr
|
# ? Aug 29, 2018 23:21 |
|
Beamed posted:I know this was posted in jest but this line of thought is just baffling to me, like sure okay let's pretend you actually write good code, let alone perfect code, there's -other poo poo your system is dealing with- that might cause errors you need to handle. ARGBHRWQHGEAHG maybe you wouldn't get all those io exceptions if you fixed your lovely code to only try to read data from drives that haven't failed
|
# ? Aug 29, 2018 23:22 |
|
hardware issue, won'tfix
|
# ? Aug 29, 2018 23:23 |
|
Beamed posted:hardware issue, won'tfix I mean what else do you want? Some kind of fault tolerant system
|
# ? Aug 29, 2018 23:26 |
|
I’ve never met an error I couldn’t handle
|
# ? Aug 29, 2018 23:31 |
|
some place like the daily wtf had an interview horror story where the candidate was insisting that finally() blocks might not run and the interviewers were confident that one would always run "what if I go up to the machine and unplug it? how does your finally() block run then?" interviewers blanched, ended the interview
|
# ? Aug 29, 2018 23:32 |
|
JawnV6 posted:some place like the daily wtf had an interview horror story where the candidate was insisting that finally() blocks might not run and the interviewers were confident that one would always run it runs when you plug the machine back in, obviously.
|
# ? Aug 29, 2018 23:34 |
|
good candidate
|
# ? Aug 30, 2018 00:18 |
|
JawnV6 posted:some place like the daily wtf had an interview horror story where the candidate was insisting that finally() blocks might not run and the interviewers were confident that one would always run in fairness, for a lot of things this usually doesn't matter
|
# ? Aug 30, 2018 01:32 |
|
JawnV6 posted:some place like the daily wtf had an interview horror story where the candidate was insisting that finally() blocks might not run and the interviewers were confident that one would always run i think the important distinction here would be is there any case where the finally() block would not run, but the rest of the program would. the answer to that should be no, but who the hell knows anything
|
# ? Aug 30, 2018 02:09 |
|
Peeny Cheez posted:I avoid these issues by writing flawless, perferct code every time. I don't know why you guys haven't thought of it. here's a hint: the code that never runs, never fails
|
# ? Aug 30, 2018 02:22 |
|
Peeny Cheez posted:I avoid these issues by writing flawless, perferct code every time. I don't know why you guys haven't thought of it. our new department head unironically said that at his previous company they just got things right on the first try, and we should just do that too
|
# ? Aug 30, 2018 02:37 |
|
fart simpson posted:our new department head unironically said that at his previous company they just got things right on the first try, and we should just do that too
|
# ? Aug 30, 2018 03:35 |
|
Stringent posted:i think the important distinction here would be is there any case where the finally() block would not run, but the rest of the program would. the answer to that should be no, but who the hell knows anything i assume that the point of the exercise was to tease out something like code:
code:
|
# ? Aug 30, 2018 04:14 |
|
Yeah, see, there's always a way.
|
# ? Aug 30, 2018 06:18 |
|
fart simpson posted:our new department head unironically said that at his previous company they just got things right on the first try, and we should just do that too
|
# ? Aug 30, 2018 11:53 |
comedyblissoption posted:throb pike nice pornstar name
|
|
# ? Aug 30, 2018 15:22 |
hahahahha
|
|
# ? Aug 30, 2018 15:23 |
|
Stringent posted:i think the important distinction here would be is there any case where the finally() block would not run, but the rest of the program would. the answer to that should be no, but who the hell knows anything https://thedailywtf.com/articles/My-Tales idk there isn't much more info, but i had the impression they were running critical things in the finallys
|
# ? Aug 30, 2018 18:04 |
|
Internet Janitor posted:i assume that the point of the exercise was to tease out something like laffo @ java, i had no idea about this
|
# ? Aug 30, 2018 18:54 |
|
finally doesn't run, finalizer runs if you toggle them on... can we have a galaxy brain"finalest" that always runs?
|
# ? Aug 30, 2018 18:56 |
|
I'm currently responsible for porting a piece of java code into python. I know no java. it sure has a lot of @'s about
|
# ? Aug 30, 2018 19:19 |
|
Boiled Water posted:I'm currently responsible for porting a piece of java code into python. I know no java. don't worry, @ just means something magical is happening.
|
# ? Aug 30, 2018 19:31 |
|
@ means annotation
|
# ? Aug 30, 2018 19:55 |
|
A lot of frameworks using annotations to inject magic code to cut down on boilerplate, good luck figuring it out!
|
# ? Aug 30, 2018 20:01 |
|
DONT THREAD ON ME posted:don't worry, @ just means something magical is happening.
|
# ? Aug 30, 2018 20:03 |
|
JawnV6 posted:some place like the daily wtf had an interview horror story where the candidate was insisting that finally() blocks might not run and the interviewers were confident that one would always run Someone's never heard of a UPS
|
# ? Aug 30, 2018 20:21 |
|
Peeny Cheez posted:RetentionLevel.FUNTIME wish your posts were annotated @transient
|
# ? Aug 30, 2018 20:45 |
|
jit bull transpile posted:wish your posts were annotated @transient transient isn’t an annotation, it’s a regular modifier like static or volatile
|
# ? Aug 30, 2018 20:55 |
|
jit bull transpile posted:wish your posts were annotated @transient WELL I NEVER
|
# ? Aug 30, 2018 21:06 |
|
Boiled Water posted:I'm currently responsible for porting a piece of java code into python. I know no java. Why would you port something INTO pythong
|
# ? Aug 30, 2018 21:29 |
|
Suspicious Dish posted:Why would you port something INTO pythong it isn't too bad if you use mypy, but we only use it for devops stuff basically
|
# ? Aug 30, 2018 22:13 |
|
|
# ? May 22, 2024 09:22 |
|
Suspicious Dish posted:Why would you port something INTO pythong Because Python3.6+ is cool and good.
|
# ? Aug 30, 2018 22:16 |