The Official Status Thread
-
@HardwareGeek Obviously you wouldn't put a big constrictor around your neck. But if you think I'm joking, I'm not. My special ed teacher kept a snake in the classroom, and her go-to way of dealing with panic attacks or unique-to-special-ed situations was to put the snake around their neck. It is extremely relaxing.
-
@pie_flavor said in The Official Status Thread:
It is extremely relaxing.
So much so that they relax permanently?
I'll walk myself out now.
-
@Magus said in The Official Status Thread:
@pie_flavor if that's the show adapted from those books I read last year, I can see why you'd want to. Though it's the characters more than the plot that made that story something I'd rather not remember.
I know exactly what you're talking about. No, the show is far better than the books. They took huge liberties with the source material for the first couple of seasons and now they're just doing their own thing. It's among my favorite shows of all time.
-
Status:
-
@pie_flavor I'm guessing whatever music player that is should have less Milton normally?
-
@Zerosquare said in The Official Status Thread:
Write your own integer-parsing function. It will certainly be smaller than whatever code is in the Microchip libc implementation, and as a bonus, it may actually work fine.
I will if I have to, but
sscanf
seems to do a great job apart from the%hhu
failure.I inherited some of this project, the previous way it checked buffers for strings and extracted data was:
for (x = 0; x <= (BUFFER_ELEMENTS - 8); x++) { if ( (BufferUART[x] == 'D') && (BufferUART[x + 1] == 'E') && (BufferUART[x + 2] == 'R') && (BufferUART[x + 3] == 'P') && (BufferUART[x + 5] == '=')) { return BufferUART[10]; } }
There was a roughly a billion of these damn things everywhere, now it's neat....and juuuust fits.
-
@Cursorkeys This would be the aforementioned DJing app. Yes.
-
@Cursorkeys said in The Official Status Thread:
@Zerosquare said in The Official Status Thread:
Write your own integer-parsing function. It will certainly be smaller than whatever code is in the Microchip libc implementation, and as a bonus, it may actually work fine.
I will if I have to, but
sscanf
seems to do a great job apart from the%hhu
failure.I inherited some of this project, the previous way it checked buffers for strings and extracted data was:
for (x = 0; x <= (BUFFER_ELEMENTS - 8); x++) { if ( (BufferUART[x] == 'D') && (BufferUART[x + 1] == 'E') && (BufferUART[x + 2] == 'R') && (BufferUART[x + 3] == 'P') && (BufferUART[x + 5] == '=')) { return BufferUART[10]; } }
There was a roughly a billion of these damn things everywhere, now it's neat....and juuuust fits.
A good compiler should probably be expanding
strncmp(BufferUART, "DERP=", 5)
on it's own. But you're on a microcontroller, which is different.I don't know in this case whether the quoted code would be smaller/larger/slower/faster than a strncmp callout. Probably depends on the controller.
-
@PleegWat said in The Official Status Thread:
But you're on a microcontroller, which is different.
It's not that different, other than you've got a lot less memory than usual, less memory protection, and direct hardware access. Because why would you bother with safety? That cost cycles! That costs millijoules!
-
@dkf said in The Official Status Thread:
@PleegWat said in The Official Status Thread:
But you're on a microcontroller, which is different.
It's not that different, other than you've got a lot less memory than usual, less memory protection, and direct hardware access. Because why would you bother with safety? That cost cycles! That costs millijoules!
I was hinting at compilers traditionally not being as good as on desktop.
-
@PleegWat said in The Official Status Thread:
I was hinting at compilers traditionally not being as good as on desktop.
Not that big a deal in practice; gcc will merrily target microcontrollers. The main problems are the lack of a good standard library and the lack of space.
-
This post is deleted!
-
Status: Kinda wondering what it will say about the Master Server program, which is a WPF application-that-shouldn't-be...
-
Status: six people who aren't me suddenly have Milton avatars in the DJing app. I seem to have started something.
-
@pie_flavor said in The Official Status Thread:
I seem to have started something.
-
Status: Bored.
I'm tempted to start reading the garage...
-
@Tsaukpaetra heh, that's the main reason I joined the mechanics in the first place. I can't say it really helps, though. Just makes it take longer to catch up followed by the same expanse of dullness afterwards.
-
@kazitor said in The Official Status Thread:
the same expanse of dullness afterwards.
Well I suppose it's a good thing I have lots of available fiction to read...
Edit: Just a few words...
Considering my current count of completed-reading words on this site is:
, which doesn't include other fiction sites I've mostly abandoned, I estimate about five years of content if I don't queue any more...
-
@Tsaukpaetra said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
if only I actually was able to wireshark a phone
Easy enough. Set up your capture machine in hosted AP mode to act as the middleman, connect your phone to it and the laptop to whatever.
But is this thing really only accessible via mobile App?
Yes. App-only. I assume this is why nobody else does this, since not a lot of people know how to install multiple copies of an app.
-
@Tsaukpaetra If you haven't read Worm yet, that's a good 26 books worth extra.
-
@Tsaukpaetra said in The Official Status Thread:
I'm tempted to start reading the garage...
-
Status: removed jquery from a project that didn't really need it.
Total external dependencies: 0.
Guess I'm a fake JavaScript programmer now; I suppose that's preferable.
I mean, I'm even maintaining IE compatibility and foregoing all the latest newest shiniest features because of it. Without polyfills. Or any sort of JS transpiler thing.
-
@kazitor said in The Official Status Thread:
Guess I'm a fake JavaScript programmer now
That's actually better than being called a "true JavaScript programmer".
-
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
-
@anonymous234 My vote is Option One, but the
if
must be braced too.
-
@Cursorkeys
How can you even tacitly endorse Egyptian braces?Status: Looking for a technology forum not populated by barbarians to switch to.
-
@anonymous234 said in The Official Status Thread:
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
I prefer this (additionally with my preference of brace placing):
if (thing.IsEmpty()) { return 0; } int param = getWhatever(); return thing.GetAverageValue(param);
-
@kazitor said in The Official Status Thread:
I'm even maintaining IE compatibility and foregoing all the latest newest shiniest features because of it. Without polyfills.
Is your product a plain HTML page
-
@izzion said in The Official Status Thread:
@Cursorkeys
How can you even tacitly endorse Egyptian braces?Status: Looking for a technology forum not populated by barbarians to switch to.
It's not symmetrical otherwise
It doesn't have the same risk as an unbraced
else
but it still makes me twitchy.Usually the thing people hate about my code is that I can't stand K&R bracing and use Allman. Newlines are free...
-
-
@dkf said in The Official Status Thread:
I prefer this (additionally with my preference of brace placing):
if (thing.IsEmpty()) { return 0; } return thing.GetAverageValue(getWhatever());
FTF
-
@izzion said in The Official Status Thread:
The one true style is:
No. That's an Allman variant, not One True Brace.
-
@anonymous234 said in The Official Status Thread:
Dear Microsoft: Visual Studio is great, but sometimes I feel like it's a bit too fast. After getting to work in the morning I like to play a couple rounds of solitaire, catch up on my web comics and have a cup of coffee, but sometimes it finishes launching before I'm done with the coffee. Do you think you could add a few more features to make it slower?
Just configure it so it only uses one core to build!
-
@dcon That reminds me, I had to turn that to 1 on my build server because of a nuget bug that persisted for YEARS where you couldn't run more than one pack operation in parallel without risking corruption.
That has since allegedly been fixed. I should turn it back up.
-
@anonymous234 said in The Official Status Thread:
Dear Microsoft: Visual Studio is great, but sometimes I feel like it's a bit too fast. After getting to work in the morning I like to play a couple rounds of solitaire, catch up on my web comics and have a cup of coffee, but sometimes it finishes launching before I'm done with the coffee. Do you think you could add a few more features to make it slower?
I've hear people here mention certain extensions would have this effect. Resharper comes to mind?
-
@anonymous234 said in The Official Status Thread:
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
gcc (or clang, don't remember) warns about the useless
else
in the first one.
I'd go with @dkf's choice of indenting and spaces, minus the superfluous braces. (Yes, I know, goto sue_me)Edit: it's clang-tidy
-
@Weng said in The Official Status Thread:
@dcon That reminds me, I had to turn that to 1 on my build server because of a nuget bug that persisted for YEARS where you couldn't run more than one pack operation in parallel without risking corruption.
That has since allegedly been fixed. I should turn it back up.
They fixed it. And then broke it again. And then broke parallel nuget restores too.
Parallelism obviously isn't a thing anyone cares about anymore.
-
if ( condition ) { doTheTrueThing ( ); } else { doTheOtherThing ( ); }
-
@anonymous234 Obviously, you're paid by lines of code
-
@anonymous234 said in The Official Status Thread:
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
return thing.IsEmpty() ? 0 : thing.GetAverageValue(getWhatever());
unleash the hounds!
-
@PleegWat said in The Official Status Thread:
A good compiler should probably be expanding
strncmp(BufferUART, "DERP=", 5)
on it's own.That's not what @Cursorkeys typed! (Notice the missing
BufferUART[x+4]
check)
-
@dcon Quite so. So either it should have been
strncmp(BufferUART, "DERP", 4) && BufferUART[5] == '='
, or @cursorkeys' snippet contains a bug.In either case I still think the strncmp is clearer.
-
@anonymous234 Nuking is the only thing that will work for that. ( to get a proper image)
-
status Learned how to use the glucose meter in class last night. "Hey, this is easy!"
5:45am today. 5 strips later. "Where's my fucking coffee." (Now I know just how big that drop of blood needs to be)
-
@DogsB said in The Official Status Thread:
@anonymous234 said in The Official Status Thread:
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
return thing.IsEmpty() ? 0 : thing.GetAverageValue(getWhatever());
unleash the hounds!
What, for a single ternary? It doesn't even need extra brackets to work correctly in PHP!
-
@PleegWat said in The Official Status Thread:
@DogsB said in The Official Status Thread:
@anonymous234 said in The Official Status Thread:
Bikeshedding poll of the day:
if(thing.IsEmpty()) return 0; else { int param = getWhatever(); return thing.GetAverageValue(param); }
OR
if(thing.IsEmpty()) return 0; int param = getWhatever(); return thing.GetAverageValue(param);
?
return thing.IsEmpty() ? 0 : thing.GetAverageValue(getWhatever());
unleash the hounds!
What, for a single ternary? It doesn't even need extra brackets to work correctly in PHP!
return thing == null ? -1 : thing.IsEmpty() ? 0 : thing.GetAverageValue(getWhatever());
-
@DogsB That's more like it!
-
@PleegWat said in The Official Status Thread:
or @cursorkeys' snippet contains a bug.
It was carefully representative of some of the bugs the crusty old thing had, including the fact it had a half-assed limit in the
for
that didn't stop it taking data beyond the end of the array@PleegWat said in The Official Status Thread:
I've hear people here mention certain extensions would have this effect. Resharper comes to mind?
I had to uninstall Resharper because on big projects it seemed to spend all its time doing 'background scanning' and making the whole thing grind to a halt. That and the fact the intellisense started updating slower than I could type.
-
@Cursorkeys said in The Official Status Thread:
@PleegWat said in The Official Status Thread:
I've hear people here mention certain extensions would have this effect. Resharper comes to mind?
I had to uninstall Resharper because on big projects it seemed to spend all its time doing 'background scanning' and making the whole thing grind to a halt. That and the fact the intellisense started updating slower than I could type.
Sounds like XCode to me. On an itty-bitty code-base without 3rd-party dependencies (just the basic Swift libraries & iOS SDK). But then again, XCode.
-
@PleegWat said in The Official Status Thread:
@DogsB That's more like it!
Discovered an edge case where getWhatever might return a null. It's twice as slow now but what the hell.
return thing == null ? -1 : thing.IsEmpty() ? 0 : getWhatever() != null ? thing.GetAverageValue(getWhatever()) : 0