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

  • Guest, it's time once again for the massively important and exciting FoH Asshat Tournament!



    Go here and give us your nominations!
    Who's been the biggest Asshat in the last year? Give us your worst ones!

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
In 101 cases, all the time obviously.

We are keeping tracks in how many times federal circuit cases are up holding software patents brought in light on Alice. So far almost no judge has upheld any software patents that has been challenged.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
for others

Alice Corp. v. CLS Bank International, 573 U.S. __, 134 S. Ct. 2347 (2014),[1] was a 2014 decision of the United States Supreme Court about patentable subject matter (patent eligibility).[2] The issue in the case was whether certain claims about a computer-implemented, electronic escrow service for facilitating financial transactions covered abstract ideas ineligible for patent protection. The patents were held to be invalid because the claims were drawn to an abstract idea, and implementing those claims on a computer was not enough to transform that idea into patentable subject matter.

Alice's decision made it hard to patent abstract ideas, like an algorithm. or an abstract business process. It has been one of the most important news in recent software news
 

Cad

scientia potentia est
<Bronze Donator>
26,253
53,524
We are keeping tracks in how many times federal circuit cases are up holding software patents brought in light on Alice. So far almost no judge has upheld any software patents that has been challenged.

Pure software patents have been in trouble for a long time. People don't claim them right and don't prosecute them right under 112.

SCOTUS patent cases have been messy quick fixes for a long time especially where software is concerned, at least as far back as Bilski but probably further.
 

Deathwing

<Bronze Donator>
17,071
8,076
Quite frustrating, but it is not a *fault* of C++ IMHO, but rather a *feature* and part of its C origins and compatability legacy. The language is flexible and lets you do a wide variety of things and it is up to the dev shop to set its own coding standards.

In my experience in bigger shops with a large and well organized C++ code base have the experience and size of team that can afford to implement heavy/decent code review standards. It usually falls to the senior developers to guide other devs/maintainers through the a code review process to make sure code adheres to whatever makes sense to have as a sane/readable standard for the team.

What is readable for one shop will not always be the same for another.

On the extreme end, if you are big enough (project wise), and rich enough in talent/$$ to afford it, often different components of your system might be ported/migrated/implemented in a completely different language better suited to implement your features in a simpler easier to maintain way.

I guess that's the frustrating part of this job. We sell our product as a complex static analyzer for C/C++. Which means catching stupid shit like using integers as characters and then passing a 0 to something expecting a pointer. And that something not guarding for NPDs, which is all fucking over the standard library.

So, this essentially means having test cases that is bad code to make sure our product catches it. Analyzing bad code to determine the correct behavior of a code base you don't work on(devs aren't testers here :mad: but that's another tangent) is a nightmare. I'd really like to complain to my boss about it because it's an untenable situation. But I don't know how to fix it.

Ran across another "quirk". NULL resolves to three different things in C, C++98, and C++11. Fun times. Every time I'm forced back to C++, the more I wish I had more time to learn its quirks and the more I miss working in Python.
 

Noodleface

A Mod Real Quick
38,495
16,451
I'm enjoying Java from a non hardware perspective. I mean, I am still writing software for hardware and some of it is firmware buy a lot isn't. Nice language to play in.

Day 16 and I am updating topics on a wiki.
 

Tenks

Bronze Knight of the Realm
14,163
607
Null is just a terrible thing to begin with because by nature it is ambigous. Like I need to write some persistance layer and we use Jackson JSON mapping so the incoming request to me appears as POJO. But I can't seem to find a way to differentiate between absent null and "set it to null" null. So if you're sending an update request and you want to upsert in the database I can't actually resolve if you actually want this column to be set to null or if you just didn't supply anything and wish it to remain the same. I'm sure I could fuck with the Jackson stuff to make it work but that is pretty non-standard for all the other operations.

Optional is pretty much blanket better than allowing nulls into your method. If it is require it is non-Optional and if your method can handle life without this information make it a generic Optional. So much cleaner and easier to use. Also don't get me started on methods returning null and that meaning one of a thousand different things.
 

Tenks

Bronze Knight of the Realm
14,163
607
Java is so fucked up with null usage we've even designed @Nullable and @NotNull annotations to convey meaning to the methods. Really nulls are so bastardized in the Java world but thankfully with native Optional in Java8 things are cleaning up a bit.
 

Frenzied Wombat

Potato del Grande
14,730
31,804
Java is the reason why 99% of the world's computing devices are vulnerable to attack. Fucking garbage language riddled with security flaws with a non-backwards compatible client. We have workstations running multiple POS Java versions just so we can manage the Ilo port on some old servers, as well as a few other apps.

Also *love* the fact that they obviously gave up on trying to secure the shitty language, and just made it so that you have to manually add every single program to an "allow" list in order for it to run, then to add insult to injury give you zero ways to gracefully configure this list of programs network wide.

Fuck Java. At least Adobe flash garbage is backwards compatible.
 
  • 1Like
Reactions: 1 user

wilkxus

<Bronze Donator>
519
210
I guess that's the frustrating part of this job. We sell our product as a complex static analyzer for C/C++. Which means catching stupid shit like using integers as characters and then passing a 0 to something expecting a pointer. And that something not guarding for NPDs, which is all fucking over the standard library.

So, this essentially means having test cases that is bad code to make sure our product catches it. Analyzing bad code to determine the correct behavior of a code base you don't work on(devs aren't testers here :mad: but that's another tangent) is a nightmare. I'd really like to complain to my boss about it because it's an untenable situation. But I don't know how to fix it.

Ran across another "quirk". NULL resolves to three different things in C, C++98, and C++11. Fun times. Every time I'm forced back to C++, the more I wish I had more time to learn its quirks and the more I miss working in Python.
Hmm very very cool, fun stuff! How to save inexperienced coders (especially) or better coders (not at 100% on their off days) from themselves! Nightmare indeed when you do not have the code base hehe.

Hmm, gutt reflex says.... perhaps a functional language might be easier to do this (parsing stuff) conceptually as opposed to C++, but I have not asked my brain yet... Not usefull to you anyhow sincw you are already C++.

Nightmare testing.....unless..... It would be NICE for you to have a database of cases generated from many Clients code bases that have a good catalogue of bugs caught & fixed already by their code maintenance staff. They could feed you their bugs dumped from their defect database (esp Clearcase for example). Relatively easy to give, nicely sorted and categorized and only for the types of things your product addresses.

Do you guys have such IT Client partners, to feed you cases they already caught but would like to prevent with your tools in the future? Would be a great symbiotic relationship. I used to work on a large team doing fixes, maintenance and backporting (C/C++) on a large multi platform application. Such a partnership would have been of GREAT benefit for our company, and for quite a few of our projects there.

Would have made the build cycle even more painfull though hehe.
 

wilkxus

<Bronze Donator>
519
210
Java is the reason why 99% of the world's computing devices are vulnerable to attack. Fucking garbage language riddled with security flaws with a non-backwards compatible client. We have workstations running multiple POS Java versions just so we can manage the Ilo port on some old servers, as well as a few other apps.

Also *love* the fact that they obviously gave up on trying to secure the shitty language, and just made it so that you have to manually add every single program to an "allow" list in order for it to run, then to add insult to injury give you zero ways to gracefully configure this list of programs network wide.

Fuck Java. At least Adobe flash garbage is backwards compatible.

Some truth there but its not THAT bad IMO hehe, just different trade offs with Java. It is easier to find developers at least because there are more of em: easier to train someone to be productive in Java than many other compiled languages! Besides it is good for work creation =p and for writing a lot of throw away code.... Code that would be obsolete and thrown away quickly anyhow, but probably at much higher development cost if written in something else.
 

Deathwing

<Bronze Donator>
17,071
8,076
Hmm very very cool, fun stuff! How to save inexperienced coders (especially) or better coders (not at 100% on their off days) from themselves! Nightmare indeed when you do not have the code base hehe.

Hmm, gutt reflex says.... perhaps a functional language might be easier to do this (parsing stuff) conceptually as opposed to C++, but I have not asked my brain yet... Not usefull to you anyhow sincw you are already C++.

Nightmare testing.....unless..... It would be NICE for you to have a database of cases generated from many Clients code bases that have a good catalogue of bugs caught & fixed already by their code maintenance staff. They could feed you their bugs dumped from their defect database (esp Clearcase for example). Relatively easy to give, nicely sorted and categorized and only for the types of things your product addresses.

Do you guys have such IT Client partners, to feed you cases they already caught but would like to prevent with your tools in the future? Would be a great symbiotic relationship. I used to work on a large team doing fixes, maintenance and backporting (C/C++) on a large multi platform application. Such a partnership would have been of GREAT benefit for our company, and for quite a few of our projects there.

Would have made the build cycle even more painfull though hehe.

It is definitely cool stuff and I want to work on it badly, just don't have the time. The testing system itself, written mostly in Python, is poorly neglected. This system now where I spend upwards of 50% of my day reviewing test results, never really learning anything, or learning something today but not really putting it to use/practice so I'll forget it soon...feels like a waste of my time/career.

I believe 90% of our product's code is written in pure C for a mixture of legacy/performance. Static analysis is not cheap and I don't think we could get away with even using something like Java. But I might be speaking out my ass there.

We do have a number of cases from customers, but we prefer not to depend on that. Mostly because customers are lazy and will instead work around or live with the problem rather than go through the process of reporting it. As long as the product does what they need reasonable well enough, they don't care. Also, we have 2-4 weeks worth of testing just to push a release out the door since our product is used in a security sense. We'd like to catch bugs before release rather than a customer report it.
 
Last edited:

Deathwing

<Bronze Donator>
17,071
8,076
Null is just a terrible thing to begin with because by nature it is ambigous. Like I need to write some persistance layer and we use Jackson JSON mapping so the incoming request to me appears as POJO. But I can't seem to find a way to differentiate between absent null and "set it to null" null. So if you're sending an update request and you want to upsert in the database I can't actually resolve if you actually want this column to be set to null or if you just didn't supply anything and wish it to remain the same. I'm sure I could fuck with the Jackson stuff to make it work but that is pretty non-standard for all the other operations.

Optional is pretty much blanket better than allowing nulls into your method. If it is require it is non-Optional and if your method can handle life without this information make it a generic Optional. So much cleaner and easier to use. Also don't get me started on methods returning null and that meaning one of a thousand different things.

What's your opinion Python's None? When I was programming in Java, I was still pretty fresh to programming, so null checking wasn't something I had much experience with. Just having trouble drawing analogues to your description.

I only use null checks as last resorts, and if I'm at that point I fucked up.

From what perspective? I don't know who's using the function I'm writing. If write a function that requires a pointer, I'm not going to assume they won't pass in a null pointer. I can see bypassing null checks on internal-only class functions.
 

Tenks

Bronze Knight of the Realm
14,163
607
What's your opinion Python's None? When I was programming in Java, I was still pretty fresh to programming, so null checking wasn't something I had much experience with. Just having trouble drawing analogues to your description.

I'm not a python developer but it looks like None would have pretty much the same issues as null.

From what perspective? I don't know who's using the function I'm writing. If write a function that requires a pointer, I'm not going to assume they won't pass in a null pointer. I can see bypassing null checks on internal-only class functions.

Again this is why Optionals are really intuitive to use. If you design the API in such a fashion you can make it very obvious to users of the API what is required and what is not required. If your method will absolutely barf if you don't supply some arguments but others are just fluff making the 'fluff' arguments Optionals makes it very easy on your end (Optional.isEmpty() == not supplied) but also conveys meaning to your consumers on what to expect.

I really like this article explaining the pitfalls of null in Java and how to remedy them with Optional

http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html
 

Deathwing

<Bronze Donator>
17,071
8,076
I reread your post from yesterday. I would say Python None is a bit different. An empty list or string, which I'm guessing is what you mean by "absent null", and a None will both hit

if not x

But if you explicitly test for

if x is None

You'll be able to tell if the data structure is empty or set explicitly to None. Java must have something like that?
 

Noodleface

A Mod Real Quick
38,495
16,451
What's your opinion Python's None? When I was programming in Java, I was still pretty fresh to programming, so null checking wasn't something I had much experience with. Just having trouble drawing analogues to your description.



From what perspective? I don't know who's using the function I'm writing. If write a function that requires a pointer, I'm not going to assume they won't pass in a null pointer. I can see bypassing null checks on internal-only class functions.
The way our code was always written was to just accept the pointer as is. If someone passes a null pointer then the BIOS would handle it like a regular pointer. If that caused a crash or hang or device failure then that was on them to debug. We didn't publicly hand out an API or anything, so perhaps that's part of my mentality.
 

Dr Neir

Trakanon Raider
832
1,505
ROFL, my side are hurting.

Be lucky Noodle, I have in the past only had notepad to use as the only option.
 

Tenks

Bronze Knight of the Realm
14,163
607
I'm doing "CS for a day" at work tomorrow which means I get to learn the ins and outs of being a WoW GM. Should be fun. May ban Noodle.
 
  • 1Like
Reactions: 1 user