Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
NinjaDebugger
Apr 22, 2008


EvilJay posted:

We had code in production until I replaced it a few years ago that went something like :

a csh script that writes a perl script that writes a sql script that passes the output to a different csh script that outputs to a file that is picked up by a cronjob 30 minutes later that sent it to a different server where something similar took place. It took me the better part of a day to figure out the workflow.

I've seen workflows that absurd as part of the AWIPS system the National Weather Service uses. You are not alone.

Adbot
ADBOT LOVES YOU

NinjaDebugger
Apr 22, 2008


baquerd posted:

This is where you triple your rate.

This is absolutely correct.

NinjaDebugger
Apr 22, 2008


w00tz0r posted:

It's this. I'm fully aware of what an interface is, and I do think that these two classes should implement themselves in terms of A. The problem I have is that out of all of the member functions in A, only two of them have any business being overridden in a derived class. Instead, the entire class got copied, and the implementation was stripped completely out of A.

If this is C++, I've seen people do that repeatedly, in order to mimic Java structure by creating a "pure" interface. Their normal course from there, though, is to create an abstract implementation of that interface for any common functionality.

NinjaDebugger
Apr 22, 2008


Optimus Prime Ribs posted:

This isn't a coding horror, but is a bit of a coding related horror.
I'm currently looking for freelance work, and quoted one guy my rate of $80-100.00 per hour, and this is how he responded:


I don't even... :ughh:

This sounds like a challenge to battle, to me. Bargain for great justice!

NinjaDebugger
Apr 22, 2008


rrrrrrrrrrrt posted:

And yet people pay good money to be put through that poo poo.


Am I stupid for failing to see or understand what photographing the exam is meant to accomplish? Am I going to somehow psychically alter the exam whilst making GBS threads? I don't get it. Isn't it enough to just take it?

Presumably if you then alter your previous answers, you will be failed, as you're assumed to have looked up answers in the john.

NinjaDebugger
Apr 22, 2008


Cheekio posted:

You know, I'd think that a huge multinational like Toyota would have its act together, but again I am confronted with the folly of man.

That makes me wonder about the whole lot of it. Do contractors for the military end up with spaghetti code running their blackhawks? What about the NSA? Is it spaghetti all the way down?

I'm contracting for the USAF right now, and in the areas I'm working, there's a lot of old horrors, but the air force has bought wholeheartedly into a lot of ideas, including the idea that paying down technical debt is worth it. We more or less take 10% of our time per sprint to spend on nothing but making the code better structurally, more understandable, etc, completely aside from time spent fixing bugs or implementing new features. They also frequently prioritize issues where we tell them up front that we're going to take a bit longer than strictly necessary to make sure the code is solid, understandable, and easier for everybody to work with in the future.

Our product owner is actually doing his master's thesis right now, and from his comments, it involves running the numbers on the effect out of cycle rush requests have on overall productivity of the entire project. (Spoiler: It costs us bad every time it happens.)

NinjaDebugger
Apr 22, 2008


coffeetable posted:

Do you not sketch code out on whiteboards with colleagues either?

I generally have only used whiteboards for UML-type stuff and making sure the math works. Actual code on a whiteboard is a last resort, and I'm not really sure why people are always on about it.

NinjaDebugger
Apr 22, 2008


Star War Sex Parrot posted:

Coworker is taking a data structures class at DeVry and was tasked with taking a deck of cards and cutting it at an arbitrary point. This is like day one of class, so the only structure they're working with is an array of size 52. I'm guessing they just want to see that they can index/loop over arrays correctly, not go out of bounds, etc.

Their instructor gave them a sample implementation that looked fairly terrifying to me: they had a separate function that could be used to rotate each card forward one spot in the array (with the front card moving to the back) so we're already looking at a Θ(n) operation. Then they looped that operation based on the cut point, so I think we're looking at O(n2) — just to cut a drat deck of cards!

This sounds very much like how I learned calc in high school. "Mathematicians are lazy, we always have a shortcut. We're gonna do this once the hard way, though, so you know why we have the shortcuts."

It seems like a pretty good jumping off point for introducing structures that do it more effectively.

NinjaDebugger
Apr 22, 2008


coffeetable posted:

It might not even be other data structures.

It's a data structures class, not algorithms.

NinjaDebugger
Apr 22, 2008


Found in code at work.

code:
//-----------------------------------------------------------
//
//  static double SquareIt(double n)
//
/**
         Square the double passed in; utility function used to simplify the calculations
         (Declared static to limit the scope of the function to the file)
 
         @param n double  - number to square

         @return double - number (n) squared
*/
//-----------------------------------------------------------
static double SquareIt(double n)
{
         return n*n;
}

NinjaDebugger
Apr 22, 2008


QuantumNinja posted:

The senior capstone software team wasn't, though, and that was an amazing experience where we got into a room, divided into sub-teams, and were told to sold a software problem at a 12-person team. That was it: "Here's a problem, solve it. Pick a language and a platform, make it work."

If I ever teach an SE class (probably won't), I think I'll do that and then make people SCRUM during class.

That was our junior-level three course series. The entire class of junior SE students, herded into a class that was 3 lab periods and 1 hour-long 'lecture' per week, divided up into four teams, each assigned a role within the team and handed a project proposal from a group outside the school. We got told to make it happen, from requirements to delivery, and we had one school year to do it.

The senior design project was essentially the same thing, except we had to go find a project, too.

The horror stories about single 'software engineering' course being "intro to agile and source control" sound like what the poor CompEng students had to go through. The SoftEng program started with actual process (cutting edge poo poo for the time) in sophomore year, as soon as the basic programming knowledge was complete, with the good old Watts Humphrey book.

NinjaDebugger
Apr 22, 2008


Was helping a coworker figure out why his program ran on windows (compiled with VC++ 2012) but not under WINE. Just got this IM from him:

quote:

Confirmed. ssTimestamp >> get_time(&m_tLastTimestamp, "T,%Y,%m,%d %H:%M:%S"); being removed resolves my crash

edit: Oh jeez. This is a standard method of handling times in C++, apparently. What genius decided this was a good idea?

NinjaDebugger fucked around with this message at 18:17 on Jan 13, 2016

Adbot
ADBOT LOVES YOU

NinjaDebugger
Apr 22, 2008


eth0.n posted:

Considering that it's parsing an arbitrarily formatted time string, using one of many of locales, that seems pretty reasonable to me. It's fully type safe (unlike printf, which is maybe what that format string is evoking for you), and it follows established istream interface patterns.

Obviously, somethings not implemented right somewhere on that system, but as a standard, I don't see what's so objectionable. I guess maybe having to use a stringstream to parse a string seems a bit unnecessary?

The problem is, if you don't already know how it does what it's doing, it looks like that line is doing nothing, as the function would return a value which would then be overwritten by the extraction from stream. It's an awkward looking construct that looks like an error but isn't because of extraction operator definitions that you can't see and have to know about beforehand.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply