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.
 
  • Locked thread
weird
Jun 4, 2012

by zen death robot
in c f(void) explicitly says f doesn't take arguments. in c++, saying f() means the same thing as f(void) tho

weird fucked around with this message at 16:11 on Apr 11, 2016

Adbot
ADBOT LOVES YOU

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
i was going to say something like "but then the linker is gonna tell you to gently caress off won't it?" but i realized that 1) the linker will have access to a malloc definition anyhow, and 2) there's about 0% chance that a c linker will care about return types not matching

awesome

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

YeOldeButchere posted:

i was going to say something like "but then the linker is gonna tell you to gently caress off won't it?" but i realized that 1) the linker will have access to a malloc definition anyhow, and 2) there's about 0% chance that a c linker will care about return types not matching

awesome

C function name mangling doesn't encode arguments, return type or anything else, just the name, traditionally with an underscore in front to distinguish it from symbols declared in asm. calling conventions for C functions are designed so that if you pass too many arguments, the extra arguments will be ignored, and if you pass too few arguments, the missing arguments will be filled with random garbage, but unless the garbage makes the function crash, the program will run fine. it will probably have meaningless behavior (garbage in garbage out), but the wrong number of arguments will not by itself crash the program or compromise its integrity

C is "awesome"

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
yeah, i sorta knew about most of that stuff, partly because of c++ compilers throwing out a bunch of deprecated c behavior errors about implicit declarations when misspelling function names, and partly thanks to the Underhanded C Contest where mismatching declarations/definitions are not an uncommon entry point for hidden behavior

HoboMan
Nov 4, 2010

ahmeni posted:

remember that programming is a discipline and that you should write some loving tests, where are your goddamn tests man

this is a good question, i just came out of a meeting to outline the plan for people to start writing regression tests (no, we don't have any right now). it's not me that's gotta write them, we apparently do have a qa team. i mentioned that automating regression testing instead of doing them by hand every time would probably be a good idea. my boss replied "ok, you should go get on implementing that then". gently caress, uhhhhhhhhhhhh???

Bloody posted:

or at least acknowledge you should write tests then sigh wistfully and get back to implementing new features without fixing old bugs

also this. there's so many tickets. we're supposed to be "feature locked" for the next release, but haha no

HoboMan fucked around with this message at 16:56 on Apr 11, 2016

fritz
Jul 26, 2003

HoboMan posted:

my boss replied "ok, you should go get on implementing that then". gently caress, uhhhhhhhhhhhh???


no good deed goes unpunished

JawnV6
Jul 4, 2004

So hot ...
scratch your own itch. document your current workflow to a level that someone could take over just from reading it, then work on improving the obvious bits.

automate one bit of the regression test every week. week 1: make kicking it off pushbutton. week 2: make collecting results pushbutton. week 3: triage, week 50: sippin mojitos while HoboBot does all the work

Bloody
Mar 3, 2013

JawnV6 posted:

scratch your own itch. document your current workflow to a level that someone could take over just from reading it, then work on improving the obvious bits.

,
but made out of poo poo

HoboMan
Nov 4, 2010

so anyone recommend a documentation and testing setup for visual studio 2010?

e: also deployment because i currently deploy by copy-pasting the files onto the server

HoboMan fucked around with this message at 19:45 on Apr 11, 2016

JawnV6
Jul 4, 2004

So hot ...
go hit up Ithaqua in the grey forums, he does that for a living

but my recommendations are: 1. Open up notepad and quit pretending you need a fancier tool

JawnV6
Jul 4, 2004

So hot ...
btw, I'm on one end of the pendulum swing where I'm avoiding building tools. wondering if anyone else hits this point

i had to set up 60+ server entities. i scripted half of it, then did a naive check on every single one of them and manual work to finish them up. the tool for the second half would not have had great ROI, but I also jump to "i know! ill build a TOOL to do it!" waaaay too frequently lately and i've got a bunch of tools that did One Thing, That One Time, and haven't been used since

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

JawnV6 posted:

btw, I'm on one end of the pendulum swing where I'm avoiding building tools. wondering if anyone else hits this point

i had to set up 60+ server entities. i scripted half of it, then did a naive check on every single one of them and manual work to finish them up. the tool for the second half would not have had great ROI, but I also jump to "i know! ill build a TOOL to do it!" waaaay too frequently lately and i've got a bunch of tools that did One Thing, That One Time, and haven't been used since

same and i also have a bunch of half-assed one-off tools that have hardcoded paths like /home/crip_eatin_bread/data/foobar.bin

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

JawnV6 posted:

btw, I'm on one end of the pendulum swing where I'm avoiding building tools. wondering if anyone else hits this point

i had to set up 60+ server entities. i scripted half of it, then did a naive check on every single one of them and manual work to finish them up. the tool for the second half would not have had great ROI, but I also jump to "i know! ill build a TOOL to do it!" waaaay too frequently lately and i've got a bunch of tools that did One Thing, That One Time, and haven't been used since

i've had the best luck when i look for existing tools first. there is often something that can be used to solve whatever problem i'm having

compuserved
Mar 20, 2006

Nap Ghost
git apparently lets you commit files with canonically equivalent pathnames. if i did the following on linux, would a subsequent `git checkout` just straight up fail on OS X, where all filenames are UTF-16 NFD strings, because OS X would think both pathnames refer to same file?

pre:
% git init
% touch $'y\xc3\xb3spos.txt'   # UTF-8 NFC (yóspos.txt)
% touch $'yo\xcc\x81spos.txt'  # UTF-8 NFD (yóspos.txt)
% git commit -a -m 'pathname fuckery'
also, doesn't the following contradict git's claim that pathnames are encoded as UTF-8 NFC? and doesn't git's other claim about pathnames being non-null byte sequences contradict the previous claim? thanks git; just when i thought i finally understood how you work.

pre:
% git cat-file -p HEAD
tree e05c87a903e9b87cda408fd12ff4a8b1d7767ffe
<...>
% git cat-file -p e05c87a903e9b87cda408fd12ff4a8b1d7767ffe
100644 blob ce013625030ba8dba906f756967f9e9ca394464a    "yo\314\201spos.txt"
100644 blob cc628ccd10742baea8241c5924df992b5c019f71    "y\303\263spos.txt"
edit: it's me, i'm the blob

HoboMan
Nov 4, 2010

JawnV6 posted:

Open up notepad and quit pretending you need a fancier tool

i already got an excel spreadsheet. the thing is, i do have to coordinate with a few other people (namely the DBA and the QA lead) and all of us sending 3,000 line spreadsheets to each other to look over and compare seems like it could be improved upon. also i am afraid of sending my test sheet out to just rot in someone's email forever (there have been offhand comments to suggest this has already happened).

also i don't know a goddamn thing about automated tests except for making a pre-generated unit test in junit and i don't even remember how to do that offhand.

JawnV6
Jul 4, 2004

So hot ...
what is it you do? write that down. you don't "do" a 3,000 line spreadsheet, you're running a program or doing some tasks with the program and each line is a test? each line is a transaction? idk, idc

what generates this 3kline spreadsheet? is there any summary or subset of that that you could send to the dba/qa?

Bloody
Mar 3, 2013

think about what your test is actually doing
write code to do that

HoboMan
Nov 4, 2010

JawnV6 posted:

what generates this 3kline spreadsheet? is there any summary or subset of that that you could send to the dba/qa?

literally just typing out a script for each test ("do this, then do this"). i guess i could send just the list of test, but the script is needed by qa

JawnV6
Jul 4, 2004

So hot ...
so you have 3,000 test cases that are specified for execution by humans

these are run once a (week/day/release/month/moon) by hand and the results are put into a spreadsheet (guessing there's more than just a pass/fail column?) that is sent to the DBA & QA leads



assuming that's an accurate description, going through all 3000 of those uses and documenting the result seems like the first step to automate. look into things like AutoIT (will capture your mouse & kb inputs, then let you replay them) or this SO for a more programmatic way

HoboMan
Nov 4, 2010

JawnV6 posted:

guessing there's more than just a pass/fail column?

for the qa people to fill out? lol, no
this is going to get run once per "release".
"nah, i'm sure it all works fine" has been the only testing done before now no one knows what they are doing.
internal legacy software is fun

oh no blimp issue
Feb 23, 2011

read a book
specifically "working effectively with legacy code" by Michael C. Feathers

Bloody
Mar 3, 2013

i have read zero books about programming

oh no blimp issue
Feb 23, 2011

nothing wrong with that
but if you come into the bad programming thread asking how to be a better programmer then i dont think being told to read a book is bad

raminasi
Jan 25, 2005

a last drink with no ice
the only programming book I've read is "the art of unit testing" which I quite enjoyed

Bloody
Mar 3, 2013

Awia posted:

nothing wrong with that
but if you come into the bad programming thread asking how to be a better programmer then i dont think being told to read a book is bad

it is not bad, but it is also not the only solution :)

HoboMan
Nov 4, 2010

Bloody, show me the way

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

compuserved posted:

git apparently lets you commit files with canonically equivalent pathnames. if i did the following on linux, would a subsequent `git checkout` just straight up fail on OS X, where all filenames are UTF-16 NFD strings, because OS X would think both pathnames refer to same file?

did Linus ever go back on his "all filesystems must store names bit-identically to what their APIs are given or they're broken and not worth supporting" idiocy?

that was his position a few years ago, that färt and färt should both be allowed in a directory if they're encoded differently, and anything else is verboten and won't be supported by git or Linux

compuserved
Mar 20, 2006

Nap Ghost

eschaton posted:

did Linus ever go back on his "all filesystems must store names bit-identically to what their APIs are given or they're broken and not worth supporting" idiocy?

that was his position a few years ago, that färt and färt should both be allowed in a directory if they're encoded differently, and anything else is verboten and won't be supported by git or Linux

idk but ya that's pretty idiotic imo

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer

HoboMan posted:

Bloody, show me the way

what do you want to do in your career is probably a good question

Bloody
Mar 3, 2013

HoboMan posted:

Bloody, show me the way

very carefully

Bloody
Mar 3, 2013

i live an entirely isolated life at work and have improved my programmin skills by faffing around on company time and doing things like:
reading this thread
reading other yosthreads
reading yosblogs (tef, mononcqc)
reading nonyosblogs (danluu)
faffing around with idiot projects (haskell most recently)
managing my own workflow (jirad myself)

ahmeni
May 1, 2005

It's one continuous form where hardware and software function in perfect unison, creating a new generation of iPhone that's better by any measure.
Grimey Drawer
I went lovely Python dev -> DevOps -> Continual Delivery Engineer and most of that was just paying attention to details, listening to people, loving around with code as much as possible and being the only person who wrote unit tests in a hiring code test

qntm
Jun 17, 2009

eschaton posted:

did Linus ever go back on his "all filesystems must store names bit-identically to what their APIs are given or they're broken and not worth supporting" idiocy?

that was his position a few years ago, that färt and färt should both be allowed in a directory if they're encoded differently, and anything else is verboten and won't be supported by git or Linux

I thought Unix filenames were opaque sequences of bytes, so this would be a standpoint consistent with that

HoboMan
Nov 4, 2010

ahmeni posted:

I went lovely Python dev -> DevOps -> Continual Delivery Engineer and most of that was just paying attention to details, listening to people, loving around with code as much as possible and being the only person who wrote unit tests in a hiring code test

so what the gently caress is DevOps?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
we make ur beep go boop

quiggy
Aug 7, 2010

[in Russian] Oof.


hey fun c++03 fact: if you have a std::vector<Object*> v, then v[i]+1 compiles fine and without warning!

:suicide:

HoboMan
Nov 4, 2010

Bloody posted:

i live an entirely isolated life at work and have improved my programmin skills by faffing around on company time and doing things like:
reading this thread
reading other yosthreads
reading yosblogs (tef, mononcqc)
reading nonyosblogs (danluu)
faffing around with idiot projects (haskell most recently)
managing my own workflow (jirad myself)

this is the first thing i looked at after google "tef blog": http://programmingisterrible.com/
i don't know if it's his, but it looks like it belongs here

JawnV6
Jul 4, 2004

So hot ...

HoboMan posted:

for the qa people to fill out? lol, no
this is going to get run once per "release".
"nah, i'm sure it all works fine" has been the only testing done before now no one knows what they are doing.
internal legacy software is fun

ok, it sounds like there's a legacy QA process and a new 3k one you're trying to spin up and my questions are alternately landing on either side of that divide so imma retreat to:

1) document current
2) improve from there

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

HoboMan posted:

so what the gently caress is DevOps?
http://devopsleague.com/

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

eschaton posted:

did Linus ever go back on his "all filesystems must store names bit-identically to what their APIs are given or they're broken and not worth supporting" idiocy?

that was his position a few years ago, that färt and färt should both be allowed in a directory if they're encoded differently, and anything else is verboten and won't be supported by git or Linux

git config --global core.precomposeunicode true :sigh:

  • Locked thread