Don't let physics majors masquerading as electrical engineers code
-
This one I had to obfuscate but the wtf remains
[code]
FooTest
$
ImportantString
test 1 upper limit in units
6100
test 1 upper limit in units
5600
test 2 upper limit in units
25
test 2 upper limit in units
00
very pointless long description of the "bits" after this
10011000
important setting
2
test value 1
35
test value 2
8A8C
test value 3
9482
test value 4
4
test 3 upper limit
500
test 3 lower limit
400
test 4 limit #1
50
test 4 limit #2
30
test 4 limit #3
0
test 4 limit #4
15
test 4 limit #5
30
test 5 upper limit
50
test 5 lower limit
5
test 6 upper limit
-1
test 6 lower limit
0
a important string that doesn't get parsed ' awful commentPointlessSetting=1
ImportantSettingPath=PATH TO FILE
SecondImportantSetting=100
repeat of important setting above
2
ThirdImportantSetting=Blah.Blah[/code]
This was created by a physics major, who got hired as an EE. Who not only could not do electrical work for shit(so many wtfs). But also couldn't program for a damn but took on the tasks anyway. He now works for NYC MTA apparently.
The best part? The parsing.
All lines must be in their exact line position. It consisted of a fuckton of
[code]
tmp = LineInput(1)
tmp = LineInput(1)
tmp = LineInput(1)
tmp = LineInput(1)
[/code]It doesn't care for the "names" or the random $. In fact the real names were so long and arbitrary it is rather impossible to use them as keys.
The "10011000"? Yes it's booleans condensed into a binary string to turn things on/off instead of fucking extra config items.That #? O clearly it's the end of config section!
Nope, parses fixed line by line regardless.That .ini shit at the end?
O yea, the application he added this shit to ALREADY HAD INI PARSING EVERYWHERE.
Why is there a retarded non .ini line at the end? Fuck if I know.When the application starts it actually copies those INI lines to an INI file.
Edit:
Parsing logic continues here:
http://what.thedailywtf.com/t/dont-need-no-loops/2139
-
I have no idea what this is. It starts out looking like debugging via printf, and then turns into a config file. Then we hear about parsing. Parsing what, by whom?
I propose immediate promotion to the front page.
-
You just want it to become another Hanzo-story!
It took me a while to see that this was supposed to be a config-file, too. Didn't help that @delfinom kept changing the post
Filed Under: If anybody wants to try to obfuscate it into a Hanzo-story, be my guest @Onyx
-
You just want it to become another Hanzo-story!
I was thinking the president's daughter could be the physics major, actually. It would explain a lot.
-
Ok, what the hell? You can now put mentions in links? And they don't look like mentions? And they work?
-
I wonder what else works.
-
Thats what I do, apparently. Did you expect anything else?
I think it goes like this
One system is the mark-up. That searches for "AT" in the post without any tags around it.
The other system at a different point in time sends the notifications.Also: Weren't you the guy who had "Like Hanzo in the night" or something as subname? If not... who was it?
Filed Under: It's a mystery
-
Also: Weren't you the guy who had "Like Hanzo in the night" or something as subname? If not... who was it?
I know nothing.
-
It took me a while to see that this was supposed to be a config-file, too. Didn't help that @delfinom kept changing the post
Hey, I had to make it perfect.For an EE wtf:
(Mind you all this is only found out by me after the guy is months gone and I only started after he was gone)
The guy who wrote the format also specced a PCB's thickness for a design at 0.021" when 0.063" is typical. The end result was a massive RMA of broken product because it turns out PCBs flexing is bad. The genius had so much room there was no reason for making it thin. Also picking some weirdass nonstandard thickness costs more.Then a separate design, he had to make to provide a precision current and voltage source. Measure with microcontroller and report back to computer over USB. Yea, he couldn't figure out how to make it stablize the readings. So he "fixed" it...his way. When you "calibrated" the board and it would save that value to EEPROM. Then when you asked the micro for a measurement of the reading, it would return that saved value instead of fucking measuring like its supposed to because the output does vary with load.
None of my coworkers believed me thats what hundreds of thousands of our products that we shipped were calibrated with.Don't get me started about how the precision stable current source in that design was actually the world's best triangle wave generator which just luckily averaged to the expected DC current value.
-
I wonder what else works.
<!-- @Onyx @boomzilla @Kuro -->
@maciejasjmj: Mentions no longer break HTML tags.
-
That did absolutely nothing. While still being styled. Yay.
-
(Mind you all this is only found out by me after the guy is months gone and I only started after he was gone)The guy who wrote the format also specced a PCB's thickness for a design at 0.021" when 0.063" is typical. The end result was a massive RMA of broken product because it turns out PCBs flexing is bad. The genius had so much room there was no reason for making it thin. Also picking some weirdass nonstandard thickness costs more.
Then there was an precision engineering design he had to make to provide a precision current and voltage source. Measure with microcontroller and report back to computer over USB. Yea, he couldn't figure out how to make it stablize the readings. So he "fixed" it...his way. When you "calibrated" the board and it would save that value to EEPROM. Then when you asked the micro for a measurement of the reading, it would return that saved value instead of fucking measuring like its supposed to because the output does vary with load.None of my coworkers believed me thats what hundreds of thousands of our products that we shipped were calibrated with.
Don't get me started about how the precision stable current source in that design was actually the world's best triangle wave generator which just luckily averaged to the expected DC current value.
So, it substitutes fudged saved data for the real measurement because he can't be arsed to make it actually work. What a bum, makes me wonder which mangler is protecting him from being sent out the door. Also, WHOTF USES THIN PCBS FOR PRECISION DEVICES?! /me knocks on the EE's skull, hears a hollow sound coming from inside...
(Explanation: not only do thin PCBs crack easier, leading to field failures, they also cause nasty mechanical-stress gremlins to come out of the woodwork and start taking a trim screwdriver to your voltage references. This is very bad news in a precision system that usually depends on the aforementioned reference voltages for much of its accuracy.)
-
Ah the thin PCB was a separate device from the precision device. But the thin PCB was on a far more critical application. Let's just say it involves alot of potential energy being stored and it's supposed to prevent short circuits/overheating/etc from making it go boom.
-
The mention of you didn't do anything because it's in a quote, so Dicsourse ignored it.
-
None of my coworkers believed me thats what hundreds of thousands of our products that we shipped were calibrated with.
Because apparently none of them ever review what the others are doing.
-
Hahaha.......yes...and still like that to this day
cries
-
Between the poor code highlighting (not necessarily here) and the
overflow:scroll
, posting code snippets on Discourse is an exercise in futility. Discourse is actively preventing us from using the site like we should. Discourse is a barrier to discussion...
-
-
Yeah, but it's normally to discussion in a way that would affect all instances. But the meat of our instance-specific discussions (code snippets) is brutally affected by what Discourse does to it.
@PJH, is this a thing that can be taken care of in CSS?
-
@PJH, is this a thing that can be taken care of in CSS?
I've reread the past few posts a few times and am still unclear what the exact problem is. ELI5?
If someone using stylish can provide some css to fix whatever it is, then yes.
-
The code snippet in the OP is in a container that limits its height. There's no reason to not just show the full code snippet in the post, without having to scroll inside the post.
-
The code snippet in the OP is in a container that limits its height.
In which case, the CSS to fix that would be:
pre code { max-height:none; }
Sorry, not "auto", "none".
-
Ah. That. Noticed it previously but found it a minor annoyance, so didn't look too deeply into it.
Mobile at the moment so cant look into it, any of you lot do some digging?
... unless @ChaosTheEternal's hack will do it?
-
There's no reason to not just show the full code snippet in the post, without having to scroll inside the post.
Sure there is.
But this forum lets Ben L post 50,000 vertical pixels of unicode bullshit, so it should at least be consistent as to whether that's "ok" or not.
It's dumb to limit the height of a code box, but not a box full of 50,000 vertical pixels of Ben L wank.
-
Sure there is.
But this forum lets Ben L post 50,000 vertical pixels of unicode bullshit, so it should at least be consistent as to whether that's "ok" or not.
It's dumb to limit the height of a code box, but not a box full of 50,000 vertical pixels of Ben L wank.
The correct control to allow the user to scroll through the code should be that one all the way to the left of your window
------------------------------------------------------------------------------------------------------------------------------------>you looked right, didn't you?
-
You misread me. I'm not saying you're wrong, I'm saying the bigger crime here is the inconsistency. It doesn't make sense that it's "ok" to limit the height of one type of post and not another.
-
that one all the way to the left of your window
---------------------->
Erm...
-
You misread me. I'm not saying you're wrong, I'm saying the bigger crime here is the inconsistency. It doesn't make sense that it's "ok" to limit the height of one type of post and not another.
That I agree with.
-
@chubertdev said:
---------------------->
Erm...
-
Erm...
Someone missed the fine print:
<small><small><small><small><small><small><small><small><small><small><small><small>you looked right, didn't you?
-
-
-
It's too <small>.
-
@Onyx
sorry about that man.
-
oh shiz that's interesting....... how doesn't that display anything, the preview looks fine.
broken HTML for the win!!
-
fight!
-
Torturing people with discourse spamming email messages about new posts is a thing huh?
-
oh shiz that's interesting....... how doesn't that display anything, the preview looks fine.
broken HTML for the win!!Maybe if you'd closed some of those tags ...
-
Maybe if you'd closed some of those tags ...
Tag closing is for losers, I let Dicsourse handle all my tag closing by using other tags that Dicsourse auto-closes open tags prior to it.
@sobiteme
I refuse to close anything that dicsourse will close for me
-
Ah the thin PCB was a separate device from the precision device. But the thin PCB was on a far more critical application. Let's just say it involves alot of potential energy being stored and it's supposed to prevent short circuits/overheating/etc from making it go boom.
No way. Did this ever have to get past UL/...? I smell magic black smoke wafting from your EE's contraption....
-
Tag closing is for losers, I let Dicsourse handle all my tag closing by using other tags that Dicsourse auto-closes open tags prior to it.
<a class="mention">@sobiteme</a>
<big>I refuse to close anything <small> <sup>that dicsourse will close for meExcept they've been fixing that.
(Can't believe I just said that)
-
That mention worked btw.
-
I smell magic black smoke wafting from your EE's contraption
No, that's white smoke:
First law of electronics: All electronic devices run on white smoke. Once the white smoke comes out, the device stops working.
-
No UL certification required in this application. But it did pass UN Transportation(of Dangerous Goods) and shock & vibe tests. Somehow
Of course the issue has since been fixed(only a year) with a thicker PCB.
-
tarunik said:
I smell magic black smoke wafting from your EE's contraptionNo, that's white smoke:
First law of electronics: All electronic devices run on white smoke. Once the white smoke comes out, the device stops working.
No, the white (or blue) smoke is simply when it stops working in a fragrant fashion. The black smoke is when it actually decides to self-ignite in a sustained and energetic way.
-
Except they've been fixing that.
(Can't believe I just said that)
Yes it appears they have... now it just jacks the rest of the post up.
Is that really "fixed"?
-
-
Is that really "fixed"?
Forcing you to put in your own closing tags if you don't want them to carry to the end of the post? Yes, that's fixed.
-
[spoiler][/spoiler]soIcantypeanythinginthissectionaslongasiusenospacesbecausewhoknowswhatkind_of_stupid_bug_they_have_that_screws_this_up?
Well that's interesting.
[spoiler] seriously though[/spoiler]
-
[spoiler][/spoiler]@abarker wonder if it mentioned you....