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
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Accidents happen to the best of us.

Adbot
ADBOT LOVES YOU

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Suspicious Dish posted:

Accidents happen to the best of us.

True, but now the "source control experts" have to explain to a client that they hosed up using source control. Not exactly confidence inspiring.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Can't he just say whoops I hosed up the merge

Jewel
May 2, 2009

Hard NOP Life posted:

Can't he just say whoops I hosed up the merge

You hire a plumber to fix a leak. He comes to your house and "whoops I hosed up your plumbing"!

ToxicFrog
Apr 26, 2008


If it's in source control, why is this even an issue? Just revert the changes.

That Turkey Story
Mar 30, 2003

ToxicFrog posted:

If it's in source control, why is this even an issue? Just revert the changes.

Right. I don't really see what the huge deal is here.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

That Turkey Story posted:

Right. I don't really see what the huge deal is here.

It's not a huge deal -- he made a relevant change, it just blew away a completely different, also relevant change I made a few days ago. It took about 30 seconds to merge the two changes.

I was just amused because we're being hired as ALM experts who know all about source control practices (and we do!), and then we managed to gently caress up one of the most basic source control operations. It's like a fireman accidentally burning their house down.

Lurchington
Jan 2, 2003

Forums Dragoon

Ithaqua posted:

It's not a huge deal -- he made a relevant change, it just blew away a completely different, also relevant change I made a few days ago. It took about 30 seconds to merge the two changes.

I was just amused because we're being hired as ALM experts who know all about source control practices (and we do!), and then we managed to gently caress up one of the most basic source control operations. It's like a fireman accidentally burning their house down.

I too laugh when highly-paid "experts" mess up in whatever field they're boasting expertise, but the fireman thing seems a bit hyperbolic.
There's a certain amount of "my fault, I'll work to fix it" that probably should have been done on their part (hopefully they did) and then we all move on with our lives. I've made too many mistakes that should be beneath me to cast the first stone here :(

Zombywuf
Mar 29, 2008

Ithaqua posted:

It's not a huge deal -- he made a relevant change, it just blew away a completely different, also relevant change I made a few days ago. It took about 30 seconds to merge the two changes.

I was just amused because we're being hired as ALM experts who know all about source control practices (and we do!), and then we managed to gently caress up one of the most basic source control operations. It's like a fireman accidentally burning their house down.

Fixing mistakes is what using source control is all about. Gotta make mistakes to fix them.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
If anything, this is a story you can use when teaching.

"I was a moron and accidentally blew away my coworker's changes because I had too much to drink last night, but with source control it took 30 seconds get everything back to proper behavior Hold on, let me show you exactly what I did."

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Ithaqua posted:

I was just amused because we're being hired as ALM experts who know all about source control practices (and we do!), and then we managed to gently caress up one of the most basic source control operations. It's like a fireman accidentally burning their house down.

What's "ALM" again?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Cocoa Crispies posted:

What's "ALM" again?

Application Lifecycle Management

bewilderment
Nov 22, 2007
man what



So a while ago I talked about me getting my first computing job, but finding out from the interviewer that they 'had their own flavour of Basic'.

Yesterday I had my first day.
Yes, they do indeed. According to the training documents, it's based on UniBasic. From what I can tell it's dynamically typed, but it's also not object-oriented. Arrays are dynamic and allow mixing of data types. TheirBasic compiles to C++ code, which then compiles to objects. I took a look at the C++ code once, but it consisted entirely of autogenerated comments and my existing TheirBasic code, which appear to be wrappers for C++ methods.

They also have their own editor in the terminal. It's very awkward to use because you can only page down either 20 lines down, or one. There is no way to directly edit a line, only to use Sed-style replacement or to replace the entire line. They even have their own command line environment running on Red Hat, but at least it's possible to access the standard shell.

So what's up with using TheirBasic, I wonder? Well, the same reason anything terrible happens: poor foresight and it being too expensive to change. Someone started the original code way back when in UniBasic, and they created TheirBasic for backwards compatibility in code.

This code ends up powering billing systems for several major infrastructure systems in my state.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Are you saying that you have to code with a line editor in 2013 CE? You're not saying that, are you?

bewilderment
Nov 22, 2007
man what



Gazpacho posted:

Are you saying that you have to code with a line editor in 2013 CE? You're not saying that, are you?

Do I have to? No. We trainees had to use it for the first couple exercises because apparently it's their main way of remote database access (I chose not to question this further) but by day 2 we're all using Notepad++. The company has even provided a language definition for it for syntax highlighting. Although it highlights the 'FOR' in 'BEFORE', both of which are keywords. However, actually compiling and running the code within the environment still requires firing up the Editor in their command line to use its inbuilt macro to make sure the code is formatted correctly, then typing another quick macro to compile.

More fun with TheirBasic: All external subroutines must have their accepted parameters listed in an identically named file in a separate directory in the corporate filesystem. Typically this is a one-line file that consists of
code:
IN VAR, IN VAR, IN OUT VAR
or similar. But hey, at least there's a quick macro in the line editor to create/edit this one-line file as you edit a subroutine so you can quickly create it and save it. Isn't that great? Don't forget that you need to edit it if you ever change the subroutine's parameters!

bewilderment fucked around with this message at 08:25 on Mar 13, 2013

Brecht
Nov 7, 2009
I look forward to many exciting stores from you, in the coming days and weeks before you quit.

(Seriously you should quit, there is no reason in this market to put up with a shop like that)

bewilderment
Nov 22, 2007
man what



Brecht posted:

I look forward to many exciting stores from you, in the coming days and weeks before you quit.

(Seriously you should quit, there is no reason in this market to put up with a shop like that)

I live in Australia and have nothing useful to show on my resume but good grades. I was too lazy back in uni to get an internship, which is biting me in the rear end now. It's a grad position, and they've hired on a couple other grads besides me so they're all going through the same level of WTF. I was also very very close to being broke before I got the job, so I'm stuck with this for a while until I've got some spare cash and can leave with a good reference.

And hey, the location is perfect for me.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

bewilderment posted:

I live in Australia and have nothing useful to show on my resume but good grades. I was too lazy back in uni to get an internship, which is biting me in the rear end now. It's a grad position, and they've hired on a couple other grads besides me so they're all going through the same level of WTF. I was also very very close to being broke before I got the job, so I'm stuck with this for a while until I've got some spare cash and can leave with a good reference.

And hey, the location is perfect for me.

Keep in mind, you are learning basically no marketable skills.
You: "I have 6 years of experience in TheirBASIC!"
Employer: "I don't know what TheirBASIC is. I need Java/C/Perl/Python/Brainfuck developers"

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Ithaqua posted:

Keep in mind, you are learning basically no marketable skills.
You: "I have 6 years of experience in TheirBASIC!"
Employer: "I don't know what TheirBASIC is. I need Java/C/Perl/Python/Brainfuck developers"

This. Unless you really, really need the money, I would gtfo pronto. You will learn only bad habits here, you'll have a giant black hole on your resume, and unless you're a total nitwit you can do better.

Take two weeks and learn some Android. You'll get an immediate pay bump over this job and people will actually be interested in what you've done.

armorer
Aug 6, 2012

I like metal.

Ithaqua posted:

Keep in mind, you are learning basically no marketable skills.
You: "I have 6 years of experience in TheirBASIC!"
Employer: "I don't know what TheirBASIC is. I need Java/C/Perl/Python/Brainfuck developers"

This, times 1000. I understand that you need a job and the location is great, but you should start looking elsewhere immediately. If interviewers ask why you are looking to leave so soon after finding a job, just tell them that the company writes all of its code in a proprietary basic. They will understand. Seriously - working in this kind of place is like being in limbo. You get older, you might get paid more over time, but you get less and less valuable to the rest of the industry. If and when you want to change jobs, it will be hell and you will essentially have to start your career over again.

Edit:
VVVVV - Fair enough... but the general sentiment still stands.

armorer fucked around with this message at 13:43 on Mar 13, 2013

Doctor w-rw-rw-
Jun 24, 2008

armorer posted:

This, times 1000. I understand that you need a job and the location is great, but you should start looking elsewhere immediately. If interviewers ask why you are looking to leave so soon after finding a job, just tell them that the company writes all of its code in a proprietary basic. They will understand. Seriously - working in this kind of place is like being in limbo. You get older, you might get paid more over time, but you get less and less valuable to the rest of the industry. If and when you want to change jobs, it will be hell and you will essentially have to start your career over again.

Well, you might have to word it in a way that's more palatable (as in, more clearly horrific) than just "they used proprietary basic":

"The company used a proprietary BASIC language that compiled to C++ using a customized line editor." Put those together is a much more compelling argument that you had to GTFO than just "proprietary BASIC", IMO.

The Gripper
Sep 14, 2004
i am winner
Australia's developer market is super trashy to enter into currently so I won't fault you for sticking with the job you have for the time being, but for the love of god make sure you mention this home-rolled BASIC setup as an issue in your next interview, don't gloss it over.

Too many people try to be completely neutral about previous positions held in interviews even if there are legitimate issues they wanted to get away from, and in this case a prospective employer will definitely give you points for knowing there's a problem and having the initiative to push for something better (the new position). You might not get any first-hand experience in a language you'll ever see again but you can at least spin your time spent there in your favour to an extent.

ninjeff
Jan 19, 2004

bewilderment posted:

I live in Australia and have nothing useful to show on my resume but good grades. I was too lazy back in uni to get an internship, which is biting me in the rear end now. It's a grad position, and they've hired on a couple other grads besides me so they're all going through the same level of WTF. I was also very very close to being broke before I got the job, so I'm stuck with this for a while until I've got some spare cash and can leave with a good reference.

And hey, the location is perfect for me.
Where are you in Australia?

AgentOrange
Nov 27, 2005

One of my favorites:

code:
x[strlen(x)] = '\0';

AgentOrange fucked around with this message at 18:11 on Mar 13, 2013

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

The Gripper posted:

Australia's developer market is super trashy to enter into currently so I won't fault you for sticking with the job you have for the time being, but for the love of god make sure you mention this home-rolled BASIC setup as an issue in your next interview, don't gloss it over.
Say it in interviews with technical staff though, not to recruiting bots because they won't know what it means except that you have no skills now and forever.

bewilderment
Nov 22, 2007
man what



ninjeff posted:

Where are you in Australia?

Melbourne area. I'm well aware of the 'zero transferable/marketable skills' issue, which is why I'm hoping to teach myself either Ruby on Rails (it's seems pretty popular in the area), Android, or one of the more popular Java frameworks (Spring is in demand).

Bhaal
Jul 13, 2001
I ain't going down alone
Dr. Infant, MD
For a while I worked in a small company that ran everything off of filePro, which is a double whammy of lovely language and lovely database. Plus the whole thing ran off of a single server running SCO unix, which handled everything from payroll, end of month reports, all the way to serving up the online retail site (which the CGI fed requests into filePro). A complete dead end nightmare with technology that was showing its age by the end of the 80s, but me and my boss worked on replicating most of their db into mysql, then having realtime updates to it out of filePro, and started a bunch of proper web app projects ("Proper" defined as LAMP but this was still an enormous step up). We were able to offload different aspects of their business piecewise onto much more sane stacks than the 70s mainframe mindset they were stuck in. We didn't get everything, but the improvements were palpable and the owners eventually "got it" so it wasn't such a diplomatic dance to get more projects approved. The end result is if you phrase it correctly on paper, talking about cost saving improvements, SEO on a website that was doing everything wrong, etc., and get a chance to discuss it with the right person (eg. not recruiter bots like in Gazpacho's excellent point) it can pay big dividends to discuss how you took a business's IT and operations infrastructure into the current age so they didn't have this slow, expensive and unmarketable core asset that was unreliable, incapable of adapting quickly, driving away good hires and required a long training time for anyone they did bring on--all while keeping the day to day functioning. 99% of the time this will set you leagues beyond an applicant who knows a lot about curry-howard and can go on and on about unit testing or whatever. I know linking Kalzumeus gets a little old but this isn't a bad read on those points and goes hand in hand with his article about salary negotiation: Don't call yourself a programmer.

So if you stick with it and can influence the owners into realizing they're in an IT black hole, and make small changes to bring them out of the dark ages, you can spin that into a substantial career asset when selling yourself to an employer, and let's face it it doesn't take long to get back up to speed on whatever the popular appstacks are.

That being all said, here's my advice: don't do it. Don't do it unless your back's against the wall, and then probably still treat it as a paycheck like you're doing landscaping or something for a day job, but with the added marginal career value since it's technically something in IT. It's a very tricky road to go down, a lot can go wrong with balancing the expectations of the owners, the smoothness of daily operations being uninterrupted, when is the best time to try and get out, etc., and you'll just be more attractive to other businesses whose infrastructure is in the shitter. I still get contacted for random contracts or full time offerings to go to some random company halfway across the continent just because old copies of my resume floating around says "filePro" and that company happens to be stuck in that particular pit of tar. That old company I was at asks me to come back about once every quarter and while it's endearing a little and the owners are Good People, I know it's because they're desperate because they still have filePro running parts of their company and ultimately there's no upside left for me over there so it's a little depressing to have to say no every time.

Also, don't do it.

Bhaal fucked around with this message at 21:11 on Mar 13, 2013

Drape Culture
Feb 9, 2010

But it was all right, everything was all right, the struggle was finished. He had won the victory over himself. He loved Big Brother.

The End.
From a code review:

C++ code:
    bool alreadyGotOneItem = flase;
According to the review notes this compiled and ran successfully.

Qwertycoatl
Dec 31, 2008

ManlyWeevil posted:

From a code review:

C++ code:
    bool alreadyGotOneItem = flase;
According to the review notes this compiled and ran successfully.

#define flase 1

I'm sure it's in some header somewhere

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer
Not sure what the problem is here, flase and treu are perfectly valid synonyms for false and true.

Goreld
May 8, 2002

"Identity Crisis" MurdererWild Guess Bizarro #1Bizarro"Me am first one I suspect!"

That Turkey Story posted:

Right. I don't really see what the huge deal is here.

Yeah - a developer who claims to never make mistakes is a liar. Despite what most people think, Da Vinci had several different practice runs at the Mona Lisa. There's older versions where the woman looks a little different, the background is completely changed, etc.

It's an important life lesson that most new college grads don't realize yet - for example those big fancy speeches/Ted Talks/Steve Jobs talks where someone seems to just be a natural presenter and got it perfect? They practiced the gently caress out of that speech, and they also visit the room several hours (if not days) beforehand so they can work out the kinks. The same goes with anything else that's difficult in life, programming included.

If I had a developer who claimed to write perfect code/have mistake-less source control, and another who readily admits mistakes (and is good at double checking results and fixing mistakes), I'd take the second any day.

Goreld fucked around with this message at 20:48 on Mar 14, 2013

Don Mega
Nov 26, 2005
I found a table in my company's database that stores passwords as plain text and I doubt my co-workers will care. They weren't too interested in preventing sql injections either.

Don Mega fucked around with this message at 21:31 on Mar 14, 2013

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Inherited a bizarre web site project. Some of the design decisions are just... wacky. The most horrific I think is how the stored procs are handled. He doesn't use the normal SQL practice of:
code:
create procedure dbo.proc
 @Txt varchar(8),
 @IDCode int,
 @SomeStatusFlag bool,
AS
BEGIN
 (do stuff, e.g. SELECT * FROM TABLE etc.)
END
Instead everything has to be a paranoid little secret black box, like:
code:
create procedure dbo.proc
 @Parms varchar(MAX) -- all parameters are encrypted on page and sent as one giant string
AS
BEGIN
 @decrypted = fnDecryptString(@Var,'SomeGodAwfulKey')
 @SelectParms = fnExtractSelectParameters (@decrypted,',')
 @FilterParms = fnExtractWhereClause (@decrypted,'&')
 @TableParms = fn ExtractTables (@decrypted,'|')

 -- a shitload of string manipulation goes here to massage above parameters

 @TSQL = 'SELECT ' + @SelectParms + ' FROM ' + @TableParms + ' WHERE ' + @FilterParms ' + AND 1=1'

 @TempTable = EXECUTE sp_executesql @TSQL
END
This fucker has it all:
- Shitloads of string handling, exactly what MSSQL is good at
- Dynamic SQL. Wanted to analyze that query? Too fuckin bad, no execution plans for you.
- Dynamic SQL Part II: Good luck debugging that. The only way to run these procs in MSMSSQL Manager is to attach a Profiler and grab the encrypted string.
- Temporary Tables everywhere. Every new @variable after BEGIN is actually a temporary table. There's also giant, labyrinth CASE statements to do stupid poo poo like pagination, sorting/ORDER BY, on each temporary table after its filled.
- 'AND 1=1' what the gently caress? Really?

The table design gets better. No numeric primary keys, all varchar(max). Some tables have a combined key made of two strings. No indexes. Dates are not type DATETIME. Money is stored as float and then floored at run time. Some fields are TEXT instead of varchar, or nvarchar. It is a giant temple of poo poo dedicated to pinning the CPU and RAM on a box that should be running this application with ease.

armorer
Aug 6, 2012

I like metal.
An application I was working on capitalizes all data from the database before displaying it on screen. While ugly, it is harmless enough as long as the data is ascii. When the data happens to be a drug dosage listed in µg though, capitalizing it makes it into MG which is NOT OK. Bugs that can kill people are the worst bugs.


Edit: ^^^^
"AND 1=1" is a standard thing tacked on to the end up programmatically built SQL statements so that people can be lazy and build up the clause in a loop.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Scaramouche posted:

- 'AND 1=1' what the gently caress? Really?

I feel your SQL pain; I've been there.

Someone gave me a reasonable explanation for "1=1".
If you write the query like:

code:
SELECT foo FROM bar
WHERE 1=1
AND butts='lmao'
AND dongs < 100
you can comment out either "AND" more easily than if you had just done WHERE butts='lmao'

I still think it's stupid, but it makes more sense.

Bobbin Threadbear
May 6, 2007

Dude probably saw it on some blog and now uses it as boilerplate.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Scaramouche posted:

Inherited a bizarre web site project. Some of the design decisions are just... wacky. The most horrific I think is how the stored procs are handled. He doesn't use the normal SQL practice of:
code:
create procedure dbo.proc
 @Txt varchar(8),
 @IDCode int,
 @SomeStatusFlag bool,
AS
BEGIN
 (do stuff, e.g. SELECT * FROM TABLE etc.)
END
Instead everything has to be a paranoid little secret black box, like:
code:
create procedure dbo.proc
 @Parms varchar(MAX) -- all parameters are encrypted on page and sent as one giant string
AS
BEGIN
 @decrypted = fnDecryptString(@Var,'SomeGodAwfulKey')
 @SelectParms = fnExtractSelectParameters (@decrypted,',')
 @FilterParms = fnExtractWhereClause (@decrypted,'&')
 @TableParms = fn ExtractTables (@decrypted,'|')

 -- a shitload of string manipulation goes here to massage above parameters

 @TSQL = 'SELECT ' + @SelectParms + ' FROM ' + @TableParms + ' WHERE ' + @FilterParms ' + AND 1=1'

 @TempTable = EXECUTE sp_executesql @TSQL
END

I would be seriously worried about some "job security" dead man's switches buried in some of those queries.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

armorer posted:

When the data happens to be a drug dosage listed in µg though, capitalizing it makes it into MG which is NOT OK.

:stare:

That can be either 1,000 or 10^14 times the prescribed dosage. Why the christ are you capitalizing metric prefixes.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

ultramiraculous posted:

:stare:

That can be either 1,000 or 10^14 times the prescribed dosage. Why the christ are you capitalizing metric prefixes.

To be fair, I don't think anyone would give someone an amount of medication literally measured in tonnes.

Also please tell me it's at least a greek-capital-letter-Mu and not an ASCII 'M'.

Adbot
ADBOT LOVES YOU

ozymandOS
Jun 9, 2004

Jabor posted:

To be fair, I don't think anyone would give someone an amount of medication literally measured in tonnes.

Since the app capitalizes everything, I can see someone interpreting MG as milligrams, which would give a 1000x difference from micrograms. If the med is administered by a nurse or (worse) by the patient, a 1000x difference may still seem like a reasonable volume (but would likely kill someone if the drug is concentrated enough that the real reasonable volume is measured in micrograms).

That is a terrifying bug.

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