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
AggressivelyStupid
Jan 9, 2012

folks, the source control around here is one part making a new folder v.1.0.468 and one part something called accurev

help

Adbot
ADBOT LOVES YOU

AggressivelyStupid
Jan 9, 2012

im prepared to run away to Belize if that's what it takes to get away from AccuRev™

AggressivelyStupid
Jan 9, 2012

Feisty-Cadaver posted:

AccuRev isn’t that bad if you have a decent use case for their version stream setup.

though that’s been copied by p4 at this point.

what would those use cases be?

Space Whale posted:

Are unencrypted config files (and application code) with plain text as gently caress sql admin passwords BADbad, or BADBAD bad?

Can unsalted unhashed passwords in a db get anyone in trouble?

:|

it's a really bad idea and I'd advise against it

AggressivelyStupid
Jan 9, 2012

ThePeavstenator posted:

When he started here the first thing he worked on was an older VS solution that we have in a git repo. He then made new projects in this solution for everything he did because he didn't know how to create a new repo for a new solution (we use VSTS so this is easy as hell from Visual Studio even if you don't know git). He'd periodically (like once every week or so :stare:) ask me to help him get his stuff "checked in" and every time I'd have to remind him that committing doesn't also push to remote. I'd also try to use this as an opportunity to teach him stuff about git but once he got his stuff committed, he brushed it off as a thing he'd worry about later.

I made a change to the original code that belongs in this repo. He tried to merge my changes locally but instead of committing, or stashing, or branching, he did a reset. Since he has like 10 other unrelated projects in this repo with uncommitted changes, he lost all of it.

perfect in every way

AggressivelyStupid
Jan 9, 2012

cinci zoo sniper posted:

also im dumb and playing poe again so time to crack out my scala value counter for poe stash and finish it to some usable-ish state

poe is cool and good

AggressivelyStupid
Jan 9, 2012

if you held a gun to my head and said pronounce quaternions I'd say pull the trigger

that could be because I've been staring at

code:

NUM_OF_BYTES = 9;
char* foo = (char*)malloc(NUM_OF_BYTES*sizeof(char));

and I'm ready to just go home by any means necessary

AggressivelyStupid
Jan 9, 2012

Luigi Thirty posted:

I was going to say “hey what if you’re on a system with weird bytes” then did a quick google and C99 says sizeof(char) is defined to be always 1

Yeah that was my first thought but then it's modern c++ written in the past 3 years explicitly for windows 7 and up so why this guy did this for 50+ variables (with NUM_OF_BYTES changing every couple variables) is beyond me but alas,

AggressivelyStupid
Jan 9, 2012


yeah, my fun job tomorrow is throwing all of that in the trash and fixing it

AggressivelyStupid
Jan 9, 2012

Luigi Thirty posted:

homemade lisp status:



:yosnice:

AggressivelyStupid
Jan 9, 2012

white sauce posted:

I'm working through the problems by myself already, I just kinda needed some guidance understanding some of the basics (like boolean operators). I've never really coded before and the teacher threw us a difficult first set of problems, so I thought I would need help from someone that already knows his poo poo.

The main issue is that it's a huge loving class and the teacher and the TA's all have their own poo poo going and 1 on 1 time is limited, so I need to seek outside sources of help. But yea, it's doable, it'd just be faster if I had someone to tell me "oh that problem is Big O notation question"

Dropping Big O in babies first programming class sounds cruel and unusual


:justpost:

AggressivelyStupid
Jan 9, 2012

CRIP EATIN BREAD posted:

i'm pretty sure that at my university, before i could take anything related to programming, i had to take an algorithms course that was nothing but reading/write pseudocoe and time complexity analysis.

yikes

Star War Sex Parrot posted:

babies first programming class at my undergrad dropped EBNF on us day one

jesus christ what the gently caress

That wasn't until late year 2 for me, but the first two years were like math, engineering, chemistry (or physics but gently caress that) and some light programming along with some Liberal Arts

DONT THREAD ON ME posted:

doing theory out of the gate is going to weed out a lot of people who would have succeeded if they had more context first, imo.

agreed

AggressivelyStupid
Jan 9, 2012

Kilometres Davis posted:

Fixing this database has turned me into the db janitor I came here to write software damnit

this is why I'm afraid to reveal my sql knowledge at work

AggressivelyStupid
Jan 9, 2012

wait helpful compiler errors exist?? tell me more... which book?

AggressivelyStupid
Jan 9, 2012

time is evil

AggressivelyStupid
Jan 9, 2012

Is there something about c that forces you to dump 40 some odd c and h files into a single directory, with vaguely cryptic names, and file lengths reaching to 5k lines (not generated) or are the people that wrote this broken

I know enough c to be very dangerous but my work with other languages is telling me this is a pile of codesmell I've fallen into

AggressivelyStupid
Jan 9, 2012

cZk posted:

still better than node_modules

ive barely had the pleasure but thats a real low bar to clear

AggressivelyStupid
Jan 9, 2012

i think we're using PLM software as... a repository for software/firmware builds??.? I want to die

AggressivelyStupid
Jan 9, 2012

hm yes let me just find the most recent version of source code on this piece of hardware they want me to debug

hmm it's Part Number 6482-3556-846 revision b

wait what the gently caress

oh no


steps to find the source for a build:
Go to PLM, search for a loving part number

If you find it, you go to the attached files, there's sometimes (but not always!!!) a file helpfully named SourceCodeLocation.txt

Inside this text file (which may or may not exist) is the server, depot, stream, and snapshot for the source code in accurev

how do I make them stop doing this holy gently caress

AggressivelyStupid
Jan 9, 2012

JawnV6 posted:

is there a fig leaf of justification like "13485" or is this just home-rolled goofiness

I think it's hardware people who have been very confused about how to deal with software and firmware in relation to their hardware and they've been doing this for years and don't know any better

I'm currently in the process of going through the Bill of Materials that contains sub Bills of Materials and downloading all these loving text files in the attachments for the sub-BoMs just so I can find the source code and fix this bug

What I really want to do is find the CEO, turn him upside down, and shake him until money for git(lab/hub) and jira falls out because holy poo poo that would be such a massive improvement

AggressivelyStupid
Jan 9, 2012

there's a file in the top level bill of materials titled SourceCodeLocation.txt :siren:







It tells you to download the other ones :negative:

AggressivelyStupid
Jan 9, 2012

It's a bunch of EEs and poo poo and like they can do C and know how to design and build hardware and whatnot but uh


There's no testing for software, unless it manually done, there's the aforementioned PLM abuse, they barely use an issue tracker. There will be references to tickets in the SCM and PLM software but clearly they're not linked in any capacity. Builds are done manually, using black magic some batch scripts and a really old version of CodeWarrior to produce SREC files.

I want to unfuck all this but I'm an intern so I'll just take this as a very valuable lesson about asking about their Process in an interview and suffer for the next 4-5 months

e: actually not sure how much CodeWarrior is needed since you apparently use .exes to build???

AggressivelyStupid fucked around with this message at 19:13 on Sep 20, 2018

AggressivelyStupid
Jan 9, 2012

the internet was a mistake

AggressivelyStupid
Jan 9, 2012

folks,

is it good or bad to have a, say 12 case long switch statement wherein each case calls a function

however, whether or not this function does something or instead has the helpful comment "not implemented!" is seemingly at random

i want to say bad

AggressivelyStupid
Jan 9, 2012

My thought was just cluster the actually useful functions (there are two, I think) and have the rest just fall through

It's all related to NMEA sentences, I want to say we're primarily interested in the GSV and GGA sentences, but I'm still scanning through this abomination

its all plain old c

ratbert90 posted:

Depending on how "new" it is, it might be based off of Eclipse, at which point you can just download Eclipse and use CW's compilers. It's a MUCH nicer upgrade.

5.9.0 classic IDE

AggressivelyStupid fucked around with this message at 14:57 on Sep 21, 2018

AggressivelyStupid
Jan 9, 2012

digging through this we're doing some weird homegrown string splitting for the NMEA sentences and I'm pretty sure we could just make a copy of the string and use strtok and clean up a few hundred lines in this 4600 line file

AggressivelyStupid
Jan 9, 2012

eschaton posted:

make a class and a bunch of subclasses

this will be hard to do in c

Main Paineframe posted:

terrible programmer status: writing code to scan dynamically-loaded javascript files for their function names at load time and recording them, so that I can get rid of them later by overwriting them all with undefined

this is good, actually

AggressivelyStupid
Jan 9, 2012

im a terrible programmer and c doesn't have classes

that has not stopped the people that wrote that program im talking about from trying to approximate some aspects of classes very poorly

im just going to track down the bug, fix it, and try to forget that the source code even exists

e: oddly enough im pretty drat sure the microprocessor we're using supports c++ but we didn't choose to use it for reasons

AggressivelyStupid fucked around with this message at 03:57 on Sep 22, 2018

AggressivelyStupid
Jan 9, 2012

I'm also afraid of what they would have done with c++ available

AggressivelyStupid
Jan 9, 2012

eschaton posted:

classes is structs with pointers inside

well, yeah, but the amount of effort it would involve to untangle this pile of spaghetti isn't really worth it

its a low sale volume product, im just supposed to fix this bug, its seriously like 30-40 files with 2-5k lines of poo poo each

quote:

do you mean the processor has a C++ compiler available?

yep

AggressivelyStupid
Jan 9, 2012

CRIP EATIN BREAD posted:

help i cut my fingers off with this tool because i lacked the basic understanding of how it works, and i spent no effort to learn it. the tool must be bad!

this is me and accurev right now and i'm not sorry

AggressivelyStupid
Jan 9, 2012

ctps: folks, I think I like C

AggressivelyStupid
Jan 9, 2012

Yeah I kinda like that. Give me a rear wheel drive car with snap oversteer, give me a those dark scary corners, I lust for death

AggressivelyStupid
Jan 9, 2012

extern has been slathered all over functions in this pile of poo poo c program and I'm like 99% sure functions are implicitly extern in header files

there are some instances of variables being EXTERN, with EXTERN being conditionally defined to either nullstring or extern, depending on if __foo__ is defined

this feels gross, could someone recommend some good reading for all this? my gut tells me we're doing poo poo very wrong but I don't have any concrete reasons why

E: I've done some googling but keep getting c++ stuff which while interesting doesn't really apply

AggressivelyStupid
Jan 9, 2012

theyre actually doing a lot of:


code:
foo.c

#define __FOO_C__

...

#define __BAR__
#include "bar.h"

..

code:
bar.h

#undef EXTERN
#ifdef __BAR__
#define EXTERN extern
#else
#define EXTERN
#endif
...

EXTERN long piss(char* poo poo);
again this is pure C, i think C99 or maybe ANSI C

i actually can't get the goddamn thing to build due to linker errors, straight out of source control, which is a cool and good feeling. there's approximately 200 .c and .h files in the folder, and only 90~ of them inside the codewarrior project.

i dunno if embedded is normally this level of Hell or what but I kinda hope not

AggressivelyStupid
Jan 9, 2012

JawnV6 posted:

#ifdef guards to prevent multiple-inclusion (if that's actually what's happening) is better done with #pragma once

screwing around with extern is another smell of "this was broken once, now i have this dead chicken to wave over every new declaration"

i think this is exactly what is happening

JawnV6 posted:

sorry i have the memory of a goldfish, what's your goal here? just re-building something, trying to modify it, trying to do a new product with the old code base?

fixing some bugs and just getting the drat thing to compile in the first place

AggressivelyStupid
Jan 9, 2012

I was able to clear up the undefined linker errors by adding a few files to the project

ended up with a multi defined error instead just before I left for the day!! Looking forward to untangling that tomorrow

The annoying thing is that it's basically untouched since 2014 and these people don't have source control discipline so the compiled binaries that are in the PLM (god drat it) may well have been the result of changes that exist only on some dickhead who left last years computer

I think this somehow makes me, the intern, the leading expert on this product lmfao

AggressivelyStupid fucked around with this message at 02:59 on Sep 27, 2018

AggressivelyStupid
Jan 9, 2012

eschaton posted:

sounds like your internship is teaching you a lot

you could say that, yes

AggressivelyStupid
Jan 9, 2012

ctps: my boss barely pays attention to me so I'm just rewriting this entire project from scratch for fun instead of reading twitter

AggressivelyStupid
Jan 9, 2012

AggressivelyStupid posted:

ctps: my boss barely pays attention to me so I'm just rewriting this entire project from scratch for fun instead of reading twitter

post username combo

Adbot
ADBOT LOVES YOU

AggressivelyStupid
Jan 9, 2012

I've got a question I couldn't find an answer to after a quick google, what uh, what is going on when someone has

code:

....
#define THING variableName
....
extern double variableName;
... 

this seems dumb and bad

note that there are no quotation marks around variableName

what the gently caress

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