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
Brain Candy
May 18, 2006

USSMICHELLEBACHMAN posted:

i've only been programming 'seriously' for two years now, but testing is by far the most confusing issue i've dealt with.

it's so easy to overtest, and it's also easy to undertest. unit testing involves writing mocks for all external interfaces and objects and so you'll sit there writing tests and then realize 'wait this is really not testing anything' because you've mocked something to the point that all you're testing is whether or not calling one method will eventually call another method.

it's extremely frustrating and when i try to add full testing coverage to projects it quadruples the time involved.

on the other hand, when i just add some integration tests to make sure things do roughly what they're supposed to, it helps out a lot.

anyhow my point is that i'm bad at testing and trying to get good at testing has been harder and more ongoing than any other programming thing i've tried to learn.

full test coverage is only a concept for managers; think about errors in tests. to actually check everything, you'd need tests for your tests, which would need their own tests, and so on

tests are hard for newish programmers because you can't do it well unless you understand what 'words' you are making. see the cool fish video https://www.youtube.com/watch?v=_ahvzDzKdB0. it's hard because it's inextricably bound to design

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



i really like unit tests for testing computation. it's not so useful for testing i/o

software engineering class in college distinguished between an error, which is a program in a bad state, and a failure, which is misbehavior due to an error. regression tests are useful because they check for errors that we know cause failures. a test for an error that never occurs or never leads to a failure is just a waste of time

FamDav
Mar 29, 2008
i have to imagine every time i run across a test on a model which goes

code:
assertNull(model.getThing());
model.setThing(aThing);
assertEquals(aThing, model.getThing());
that intelliclipse auto-generated this because serious man what a waste of loving space.

you should ideally structure your code so that the IO bits can be tested against real services and then the rest can retrieve mocked data. MYSPB (Make Your poo poo Pure Brah).

FamDav
Mar 29, 2008
You may or may not ever see this in a java code base. at least they will have tests though.

nrook
Jun 25, 2009

Just let yourself become a worthless person!

FamDav posted:

i have to imagine every time i run across a test on a model which goes

code:
assertNull(model.getThing());
model.setThing(aThing);
assertEquals(aThing, model.getThing());
that intelliclipse auto-generated this because serious man what a waste of loving space.

you should ideally structure your code so that the IO bits can be tested against real services and then the rest can retrieve mocked data. MYSPB (Make Your poo poo Pure Brah).

this would actually be a cool feature

though, hilariously, your IDE would need to understand dependency injection in order to figure out how to find aThing

The Leck
Feb 27, 2001

with all this talk of testing: are there any good resources that any of you have found that deal with writing tests for software that really hasn't had any formal testing written into it before? or just for help with writing better tests in general? bonus points if there are ideas on dealing with (horrible horrible) languages without much in the way of testing frameworks

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

The Leck posted:

with all this talk of testing: are there any good resources that any of you have found that deal with writing tests for software that really hasn't had any formal testing written into it before? or just for help with writing better tests in general? bonus points if there are ideas on dealing with (horrible horrible) languages without much in the way of testing frameworks

Here's a good starting point

USSMICHELLEBACHMAN posted:

writing a test every time i fix a bug is one of the few things that makes sense to me

otherwise i've kind of approached it like 'ok i'm testing something manually, i might as well test it automatically' and then every time i think of something new to test manually, i write an automatic test for it. which is how i approached testing when i started but then i started reading about testing and it got much more complicated

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

The Leck posted:

with all this talk of testing: are there any good resources that any of you have found that deal with writing tests for software that really hasn't had any formal testing written into it before?

Suspicious Dish (iirc) pointed me towards Working With Legacy Code a few months back and it was pretty good

AWWNAW
Dec 30, 2008

in my very professional opinion TDD is better for designing than it is for testing

Morkai
May 2, 2004

aaag babbys
just having yourself in the mindset of TDD forces you to adhere better to SOLID principles. if you're just programming to metrics like coverage it's a lot easier to write a few tests that offer huge statement coverage and actual value but aren't Unit tests. do something between what meets the requirement and what soothes the autism.

JewKiller 3000
Nov 28, 2006

by Lowtax
writing a bunch of unit tests to make sure the thing meets requirements isn't worth it when, upon seeing the thing, your boss realizes those weren't actually the requirements

Bloody
Mar 3, 2013

JewKiller 3000 posted:

writing a bunch of unit tests to make sure the thing meets requirements isn't worth it when, upon seeing the thing, your boss realizes those weren't actually the requirements

Notorious b.s.d.
Jan 25, 2003

by Reene

Stringent posted:

I want to work in a company where management writes acceptance tests and I code to them for a ridiculous amount of money.

fundamentally, as a software developer, what drives your salary is developing the requirements

any loving idiot can write code. this has always been true. it will always be true

i have said it a hundred times in this thread: the only people who care about "code quality" are coders. the only thing anyone else cares about is getting the requirements right

Bloody
Mar 3, 2013

develop requirements => ship requirements to india => be disappointed => develop new requirements

Notorious b.s.d.
Jan 25, 2003

by Reene

Bloody posted:

develop requirements => ship requirements to india => be disappointed => develop new requirements

yep

as it turns out, software developers are the ones who have to establish and fill requirements

no number of business analysts or managers will remove the need for developers to talk to actual users. that is what you are paid to do. that is where your expertise pays off

sitting in front of eclipse and writing code is the least important part of your job

Bloody
Mar 3, 2013

im glad i am not a ~software engineer~

Notorious b.s.d.
Jan 25, 2003

by Reene
this is also why the smartest coders you know are unemployed

and why a lot of lovely java journeymen have solid careers and work 40 hours a week and take home bonuses

Nomnom Cookie
Aug 30, 2009



I'm the smartest programmer i know and i have a job, what now :smuggo:

Notorious b.s.d.
Jan 25, 2003

by Reene

Kevin Mitnick P.E. posted:

I'm the smartest programmer i know and i have a job, what now :smuggo:

you are probably underpaid because you think being smart matters even a little bit

if you're smart, apply that brainpower to figuring out what people need. worry less about whether code is good and more about whether the app will deliver for users

Forums Terrorist
Dec 8, 2011

being smart matters but it's not coding ability, it's your talent at bullshitting and office politics

why work hard when you can fail upwards

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

you are probably underpaid because you think being smart matters even a little bit

if you're smart, apply that brainpower to figuring out what people need. worry less about whether code is good and more about whether the app will deliver for users

but delivering for users is what the code is for? I'm not sure what you're getting at. focusing on business value i guess. which i agree a lot of times writing code is not the most valuable thing for me to be doing. right now i'm doing a lot of tier 3/ops support cause i've got more experience than ops with diagnosing loving weird problems

totes agree that i'm underpaid tho

Forums Terrorist posted:

being smart matters but it's not coding ability, it's your talent at bullshitting and office politics

why work hard when you can fail upwards

if i had excellent social skills i'd be in sales, not dev

BONGHITZ
Jan 1, 1970

Brain Candy posted:

full test coverage is only a concept for managers; think about errors in tests. to actually check everything, you'd need tests for your tests, which would need their own tests, and so on

tests are hard for newish programmers because you can't do it well unless you understand what 'words' you are making. see the cool fish video https://www.youtube.com/watch?v=_ahvzDzKdB0. it's hard because it's inextricably bound to design

hhahahah he lists eric raymond in his list of names l a m o

BONGHITZ
Jan 1, 1970

https://www.youtube.com/watch?v=csyL9EC0S0c lol its that one guy

Notorious b.s.d.
Jan 25, 2003

by Reene

Kevin Mitnick P.E. posted:

if i had excellent social skills i'd be in sales, not dev

this is the attitude i am trying to combat

sales people are good at sales. this usually implies that they are very friendly. it almost never implies strong "soft skills"

Kevin Mitnick P.E. posted:

but delivering for users is what the code is for? I'm not sure what you're getting at. focusing on business value i guess. which i agree a lot of times writing code is not the most valuable thing for me to be doing. right now i'm doing a lot of tier 3/ops support cause i've got more experience than ops with diagnosing loving weird problems

fixing bugs only matters in proportion to how much it affects users

working on an awesome n**2 to n*log(n) transition matters exactly not at all unless users are complaining or it enables users to do something new with the product

talking to users is like 99% of the useful part of your work. if you can't talk to an end user about what you are about to do to the product, you are a great target for outsourcing to alabama/india

BONGHITZ
Jan 1, 1970

the light is very distracting in that video

Notorious b.s.d.
Jan 25, 2003

by Reene

Forums Terrorist posted:

being smart matters but it's not coding ability, it's your talent at bullshitting and office politics

why work hard when you can fail upwards

usually I find people who complain about "bullshitting and office politics" have no loving idea what they are being paid to do

people are basically really high-end monkeys. what you call "bullshitting" I call "social grooming" and what you might see as "office politics" i see as the loving purpose of the office

beep boop i am a robot why are we not all telecommuting guys?

Forums Terrorist
Dec 8, 2011

i wasn't complaining mind

double sulk
Jul 2, 2010

i have a terrible programmer e/n. i've been feeling kinda lovely the last week or so for a number of reasons i'd like to do some oss stuff but it feels like any of the stuff i'd like to work on i'm too behind in terms of understanding. taking elixir for example, it's a neat language and there are a couple cool projects, but the few things there are really heavy on the http/server poo poo (new frameworks being built, see: phoenix) or stuff like database querying (see: ecto). i get by decently enough with the rails stuff i do now but it's ultimately totally different from building non-insignificant programs/libraries is still over my head, and by the time i could contribute anything of value it'll either have already been implemented or something. a lot of what i'm used to essentially abstracts what's going on in the background, which is great until you need to understand it.

basically i look at projects like those and still think "where the gently caress do you start" and it's the one thing that ever makes me regret not having a traditional cs education (to an extent). at the same time, as long as i'm working and getting paid i guess i could continue to take the who gives a gently caress approach with regards to doing oss poo poo, but i feel like it puts me behind. it's a pseudo-imposter syndrome that bothers the gently caress out of me and i'm not sure what to do. maybe i really just need to sit and read books or code bases for a few hours on end but i don't know if i have the mental patience, or maybe i just need to do something that isn't a loving web app.

in a way i really hate what i do now which is be part of a place that does consulting (even if the senior guys are doing more the initial estimate poo poo) because i end up working on a bunch of vastly different applications, and the differences between 3-4 year old libraries is mixing my brain up and i can never 100% commit anything to memory. we have a bunch of rails 2 apps that still have to be moved to rails 3, and i only really know so many of the rails 2-isms, or we have old loving versions of capybara that i can't remember what the differences are from the newer ones and it slows me down so often. basically it's a massive level of inconsistency because i don't get to pick what we work on nor the stack in some cases and i think it's hindering my growth, but at the same time it wears down my personal drive to do anything else.

that was longer than i wanted it to be but i feel pretty lovely and don't particularly have anyone to talk to about it. i'm supposed to have an onsite interview this week for a scala/ruby job and the context of what i'd be doing sounds really cool in theory, but i honestly have no idea what's going to happen or if i'd end up really wanting the job if i was fortunate enough to be offered it.

Bloody
Mar 3, 2013

double sulk posted:

do something that isn't a loving web app.
sage advice

AWWNAW
Dec 30, 2008

double sulk posted:

i have a terrible programmer e/n. i've been feeling kinda lovely the last week or so for a number of reasons i'd like to do some oss stuff but it feels like any of the stuff i'd like to work on i'm too behind in terms of understanding. taking elixir for example, it's a neat language and there are a couple cool projects, but the few things there are really heavy on the http/server poo poo (new frameworks being built, see: phoenix) or stuff like database querying (see: ecto). i get by decently enough with the rails stuff i do now but it's ultimately totally different from building non-insignificant programs/libraries is still over my head, and by the time i could contribute anything of value it'll either have already been implemented or something. a lot of what i'm used to essentially abstracts what's going on in the background, which is great until you need to understand it.

basically i look at projects like those and still think "where the gently caress do you start" and it's the one thing that ever makes me regret not having a traditional cs education (to an extent). at the same time, as long as i'm working and getting paid i guess i could continue to take the who gives a gently caress approach with regards to doing oss poo poo, but i feel like it puts me behind. it's a pseudo-imposter syndrome that bothers the gently caress out of me and i'm not sure what to do. maybe i really just need to sit and read books or code bases for a few hours on end but i don't know if i have the mental patience, or maybe i just need to do something that isn't a loving web app.

in a way i really hate what i do now which is be part of a place that does consulting (even if the senior guys are doing more the initial estimate poo poo) because i end up working on a bunch of vastly different applications, and the differences between 3-4 year old libraries is mixing my brain up and i can never 100% commit anything to memory. we have a bunch of rails 2 apps that still have to be moved to rails 3, and i only really know so many of the rails 2-isms, or we have old loving versions of capybara that i can't remember what the differences are from the newer ones and it slows me down so often. basically it's a massive level of inconsistency because i don't get to pick what we work on nor the stack in some cases and i think it's hindering my growth, but at the same time it wears down my personal drive to do anything else.

that was longer than i wanted it to be but i feel pretty lovely and don't particularly have anyone to talk to about it. i'm supposed to have an onsite interview this week for a scala/ruby job and the context of what i'd be doing sounds really cool in theory, but i honestly have no idea what's going to happen or if i'd end up really wanting the job if i was fortunate enough to be offered it.

we live in a time when the best job available is dominated by the mentally ill

Notorious b.s.d.
Jan 25, 2003

by Reene

double sulk posted:

basically it's a massive level of inconsistency because i don't get to pick what we work on nor the stack in some cases and i think it's hindering my growth, but at the same time it wears down my personal drive to do anything else.

that was longer than i wanted it to be but i feel pretty lovely and don't particularly have anyone to talk to about it.

jesus i see why you are called sulk

don't sweat it so much. go to work. don't be the smartest guy in the room. as long as the checks cash, it's all good.

seriously it is that simple. as long as someone around you is better than you are, you're learning. as long as your checks cash, you're getting paid. win/win

Notorious b.s.d.
Jan 25, 2003

by Reene
also pretty much all code is legacy code written for a version of the library/framework you know from like five years go. that is not a consulting-related phenomenon. it will happen to you at "real" jobs just as often

count yourself lucky for learning to roll with the punches this early in your career

MeruFM
Jul 27, 2010
ultimately you don't need to be a programming god to do your job. The hypothetical perfect but spergy software developer is still thoroughly outclassed (and liked more) by average joe coder who can talk like a normal human to other humans.

If you're trying to get some kind of life satisfaction out of being a good coder, it'll be a horrible path full of the worst kind of people.

Also you don't know where to start because you didn't put enough time in on using/reading the library. Consider the average worker coming into a company needs weeks to get acclimated to a code base even with other developers helping.

Contribute to OSS is a huge time investment and not worthwhile for most normal people who don't live and breath code. My contributions mostly came from being frustrated at a lack of a feature or a lovely implementation, writing my own and doing a merge request.

Notorious b.s.d.
Jan 25, 2003

by Reene
oss contributions are your last desperate hope when your resume doesn't qualify you for anything. not coincidentally, that is why the idea comes up so frequently in discussions w/ people trying to break into tech

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Notorious b.s.d. posted:

seriously it is that simple. as long as someone around you is better than you are, you're learning. as long as your checks cash, you're getting paid. win/win

Time for me to sulk, I've kinda been stuck in a rut for a couple of years where I feel like I'm the smartest guy in the room and have nothing to learn from the rest of my team. I know the only solution is to move on, but there have been other factors keeping here and it's best gig in Mexico town afaik (the rest involves selling my soul to Indian near shoring agencies).

This is the last year I plan to spend in this rut, and in the mean time I'm constantly playing around with Coursera CS classes and project euler problems to keep learning new stuff.

Stringent
Dec 22, 2004


image text goes here

Notorious b.s.d. posted:

talking to users is like 99% of the useful part of your work. if you can't talk to an end user about what you are about to do to the product, you are a great target for outsourcing to alabama/india

the problem here is the bullshit you'd have to go through within the company to be able to talk to the users

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Plastic Snake posted:

420+219+21.9+(2.19*4.20)-4.20 = ~666

hail approximately satan

actually its the difference between god, nature, and satan - evolution
(god's computers: the apple macintosh, ourselves, computers squared - complictated or evil computers - think android linux, or windows XP or 8)

fun fact lets put this in other numbers - 2^4 = 16 (carbon, u, the shitposter), 42 = H20 = water (sea, earth) 1+(9-2) = 7 = nitrogen (air, fire)

stick them all together and u get N20 - laughing gas - and N20(9) (H20)2 C (420) = the weed number

look at it backwards, and you get funny stuff (laughing (N20) at (2) things (C))

if the things are computers theyre 64 bits = 2^9 * 2 = 18/2 = 9

so the funny computer number is for reelz the 219

the pos is the union of 420 and 219, the true chill place to hang out with ur bros

for more on this exciting new videogame blend of progamming math and weed, keep an eye on ur local app store. itll be here in hovr form

Brave GNU World
Nov 1, 2013

by Cyrano4747

double sulk posted:

basically i look at projects like those and still think "where the gently caress do you start" and it's the one thing that ever makes me regret not having a traditional cs education (to an extent).

they don't really teach you this in CS courses.

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

quote:

double sulk posted:
basically i look at projects like those and still think "where the gently caress do you start" and it's the one thing that ever makes me regret not having a traditional cs education (to an extent).

lol sulk but ill bite


learn SOLID/TDD/MVC arch and doing things RIGHT. if you want to program a computer, do it the low effort easy way whatever happens. theres loving shittons of FOSS poo poo on github these days so just be smart and steal their poo poo. throw up some vms and servers, get comfortable with a bit of linux janitoring, and use the right lang for the job - whether it's C, ASM, C# ,Python (but never PHP kill you're are self first)

if you're using easy tools (langs, libs), computers (buy a fuckin mac), and arch (mvc/solid) then that will stop you loving up for the most part and also make it way easier

also buy 3 screens i reccomend that its pretty baller

Adbot
ADBOT LOVES YOU

Stringent
Dec 22, 2004


image text goes here
the only way to contribute to an open source project is to use it and fix poo poo as you need it, unfortunately

  • Locked thread