IT/Software career thread: Invert binary trees for dollars.

Tenks

Bronze Knight of the Realm
14,163
606
I think a happy accident occurred at work today. Basically I have to use an XML schema defined by someone who didn't really know anything about development. He was a DBA and my company decided all DBAs should become developers so gave them equal titles but as developers instead of DBAs. Dumb, I know. Luckily he has since left the company. So the XML schema is something like such:

The big issue here? He did not know about CDATA tags in XML. So to "fix" the issue what you put into content is always HTML escaped prior to being put into content. So if you have <root><tag>xml &gt; json</tag></root> it would escape the entire thing basically making &lt;root&gt; .... you get the idea. So I was freaking out assuming that what I'd get back would be invalid XML. I assumed it would then unescape the string and I'd get XML with the content <root><tag>xml > json</tag></root>. But I forgot to account for when the entire XML gets escaped the ampersand in the &gt; gets sanitized as well so what it actually puts in is &amp;&gt;. So when it then unescapes it turns the &amp; into an ampersand then gt; (ie: &amp;gt
wink.png
Thus the unescaping reads the &amp; and replaces with an ampersand but the next thing is just "gt;" without the leading ampersand so it doesn't unescape that it just leaves it. So I'm sure through the process of accident the entire thing actually works. I'd still prefer the stuff to be enclosed in a CDATA tag but I'm actually kind of amused how it works at the moment.
 

Cad

scientia potentia est
<Bronze Donator>
24,553
45,636
I think a happy accident occurred at work today. Basically I have to use an XML schema defined by someone who didn't really know anything about development. He was a DBA and my company decided all DBAs should become developers so gave them equal titles but as developers instead of DBAs. Dumb, I know. Luckily he has since left the company. So the XML schema is something like such:

The big issue here? He did not know about CDATA tags in XML. So to "fix" the issue what you put into content is always HTML escaped prior to being put into content. So if you have <root><tag>xml > json</tag></root> it would escape the entire thing basically making <root> .... you get the idea. So I was freaking out assuming that what I'd get back would be invalid XML. I assumed it would then unescape the string and I'd get XML with the content <root><tag>xml > json</tag></root>. But I forgot to account for when the entire XML gets escaped the ampersand in the > gets sanitized as well so what it actually puts in is &>. So when it then unescapes it turns the & into an ampersand then gt; (ie: &gt
wink.png
Thus the unescaping reads the & and replaces with an ampersand but the next thing is just "gt;" without the leading ampersand so it doesn't unescape that it just leaves it. So I'm sure through the process of accident the entire thing actually works. I'd still prefer the stuff to be enclosed in a CDATA tag but I'm actually kind of amused how it works at the moment.
If only there were libraries that already handled this stuff.
smile.png
 

Tenks

Bronze Knight of the Realm
14,163
606
The worst part is he did this schema maybe 7 months ago and I advised him to make that a CDATA field. I forgot he'd been a developer exactly 1 month at that point (but hey technically he was a higher level developer than me!) and I didn't explain what a CDATA is. I've heard feedback time and time again I can be somewhat intimidating to talk to so I'm sure he just didn't want to explain he had no fucking idea what a CDATA was instead of have me explain it to him. But now I'm tasked with going through and rewriting the code that was written to rewrite his original code so its biting me in the ass!
 

Noodleface

A Mod Real Quick
37,961
14,508
I need to vent about old guy because I can't do it at work.

He had to do a bring-up BIOS on a new server we have coming out, and I'll admit it was way too much work for him. But he screwed it up so badly that we had to strip the BIOS down to our vendor's code drop and are adding custom features one by one until something breaks.

We're talking hundreds of custom libraries, thousand of sources files, etc., and they're all intertwined - so you might be adding one thing that is dependent on 20 other things and you add those. Meanwhile some other dude is doing the same.

What a god damn mess.

To top it off, the guy believes he is an expert now and talks even louder in meetings. Oh well, gave me notice and told the team today in our meeting. I feel bad they have to deal with him.
 

moontayle

Golden Squire
4,302
165
At least you have an end to the tunnel to look forward to.

Finally hit my groove on the one project I'm working on. The current version is very procedural. Everything chains off everything and it isn't extensible. My new version actually breaks down the individual parts, making it more like a true API. Still a lot of work to be done but I've started being able to test things. Created a custom UI with a button to do it on demand. Once that all works I get to set it up to do it automatically.
 

Noodleface

A Mod Real Quick
37,961
14,508
The sucky thing is I really hit my groove as well. Definitely on my way to being a key player in the overall team (I already was, but now I'm seen as an outcast). Oh well, change will be good.
 

Tenks

Bronze Knight of the Realm
14,163
606
If you're setting a code review up in Fisheye/Crucible do you guys generally include the unit tests as well?
 

taebin

Same trailer, different park
968
429
Noodle, what is the general feeling within EMC internal about things? Common sense tells me things like accounting, HR, maybe internal IT would be merged/laid off when the deal officially goes through. But anything sales or customer facing would be fine. I'm in Cloud Managed Services and don't have any major concerns. Everything converged infrastructure seems to be where customers want to go now, hybrid cloud, etc. Maybe it's different for BIOS writers on EMC storage?
 

Noodleface

A Mod Real Quick
37,961
14,508
Converged Infrastructure is different because that's "the future" right now, I wouldn't be surprised if part of the dell acquisition was focused on that.

I can't really say much about what I've heard, but I would say most people are pretty apprehensive about this. For me, if I didn't have an offer I'd just stay and be apprehensive, but since such a sweet offer came right after the announcement I'd rather move on now than risk being laid off.

I'd guess the merger is going to cut a few departments pretty heavily like you guessed. With Dell having such a strong firmware team already, it made me more nervous.

It's all conjecture on my part, I have no idea what the future holds.
 

Tenks

Bronze Knight of the Realm
14,163
606
Generally speaking if I'm running code reviews and we have testing policies, I include unit/integration/whatever is relevant, if you wrote the tests they're part of the code you wrote to test in terms of evaluating.
I feel the same way. It also helps define the input/output a bit I feel.
 

Tenks

Bronze Knight of the Realm
14,163
606
Anyone have days at work where it feels like your brain just goes on vacation? I had one of those today. Around 1 in the afternoon my brain just wasn't having any of it. I was reading emails and I was like "Yep this is probably English." I discussed and clarified requirements with someone for about 15 minutes and sent him a unit test showing my understanding of the requirement and I got it completely wrong. Even when he said what I did wrong it was one of those "Oh duh" moments not a "I completely did not understand that" issue. Good thing I didn't have very much to do today.
 

Noodleface

A Mod Real Quick
37,961
14,508
Yeah, today I basically just sat on the forums all day - my brain wasn't having anything today. I phoned it in porting over 2 features so it looked like I did something productive.

They aren't really giving me any work, and I don't really mind, it's just boring.
 

moontayle

Golden Squire
4,302
165
Boss threw off my groove. Had me look into something else and it just killed my momentum. Ended up spending a fair amount of time looking for a new puppy, even though that's not going to happen until next year.
 

Tenks

Bronze Knight of the Realm
14,163
606
I'm really bad about being able to cruise the internet and then get back to work. I pretty much have to be full bore headphones on to actually get any work done. If I go on the internet I just get really lazy and stop doing anything the rest of the day. Luckily I'm a pretty fast programmer so I can get my work done in about half the time the team estimates (or they're also just as lazy) so I just finish my work for the day in the morning and do nothing in the afternoon.