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
Valeyard
Mar 30, 2012


Grimey Drawer
Snype?

Adbot
ADBOT LOVES YOU

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Jonny 290 posted:

testing is hugely important and nobody wants to do it because you can't add those LOC counts to the finished project and bill the customer for them

isn't this the whole point of unit tests?

if you put the tests right next to the code, you can trick the developers into writing them, plus count them as part of the codebase!

plus you feel really robust when you have to change 1000 tests that mock out your db when you change a bool into an enum

Brain Candy
May 18, 2006

and you shouldn't write comments because why write the code twice, jeez

Socracheese
Oct 20, 2008

Brain Candy posted:

and you shouldn't write comments because why write the code twice, jeez

this is true for python

Brain Candy
May 18, 2006

code:
>>> import datetime
>>> if not datetime.time(0,0,0):
...   print("please comment your fuckign code, idc how obvious it is to you")

raminasi
Jan 25, 2005

a last drink with no ice

Brain Candy posted:

and you shouldn't write comments because why write the code twice, jeez

if your code needs lots of comments you done hosed up somehow

Breakfast All Day
Oct 21, 2004

agreed, who needs comments when code is self documenting

for instance, if i see code without comments, it documents that whoever wrote it was a real fuckup

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

GrumpyDoctor posted:

if your code needs lots of comments you done hosed up somehow

or the APIs you're calling are hosed up (or the toolchain, or whatever sharp corner of reality might put out an eye)

Shaggar
Apr 26, 2006
I put comments in when I do retarded stuff like mile long linq one-liners

Bloody
Mar 3, 2013

i like putting in comments like //NOTE TO FUTURE SELF do not change this it works i swear it is correct DO NOT TOUCH!

Bloody
Mar 3, 2013

fun fact about this garbage 8051 im suffering with the register write to enter sleep mode only works if the instruction writing it is not aligned to a 4-byte boundary so you can just guess how much fun that bullshit is.

Nomnom Cookie
Aug 30, 2009



but when you're done the toaster or microwave or w/e will work so you can be proud of that accomplishment

Nomnom Cookie
Aug 30, 2009



Shaggar posted:

I put comments in when I do retarded stuff like mile long linq one-liners

i wrote a 300 line pipeline the first time i used java 8

also intellij kinda sucks dick at figuring out types for pipelines. warn me for using a lambda where a method reference would have worked? well i'm using a lambda because your analyzer doesn't understand references to generic static methods and infers the type parameter as Object!!! arghhh

Nomnom Cookie
Aug 30, 2009



i haven't decided if Class::cast is cool or horrible yet

double sulk
Jul 2, 2010

does intellij need an update to recognize my scala 2.11.0 install or something? i know the official release was only in the last couple days or so

it was "just works"ing with 2.10.x until i updated through brew and now it's broken and can't find poo poo

Nomnom Cookie
Aug 30, 2009



double sulk posted:

does intellij need an update to recognize my scala 2.11.0 install or something? i know the official release was only in the last couple days or so

it was "just works"ing with 2.10.x until i updated through brew and now it's broken and can't find poo poo

where'd u cp this from

edit: brew info scala and figure it out

double sulk
Jul 2, 2010

Kevin Mitnick P.E. posted:

where'd u cp this from

my butthole

everything just works in scala ide (modified eclipse) so i assume intellij just isn't working right for the time being

e: it mentions the caveat for intellij to set scala home to /usr/local/opt/scala/idea, but then it bitches about a bunch of missing files so i dunno

double sulk fucked around with this message at 04:42 on Apr 23, 2014

Nomnom Cookie
Aug 30, 2009



dunno then maybe try again once everyone has recompiled for 2.11 lol

double sulk
Jul 2, 2010

i guess i got it working now. hopefully they provide some updates which require less configuration soon though

Bloody
Mar 3, 2013

Kevin Mitnick P.E. posted:

but when you're done the toaster or microwave or w/e will work so you can be proud of that accomplishment

Ya and boy it will be one hell of a toaster!!!

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
your toaster is a piece of poo poo

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
comments really are bullshit though unless they're like ascii art of wizards or cats

Bloody
Mar 3, 2013

i want to start subtly including goatman ascii art in my comments or code somehow.

MeruFM
Jul 27, 2010
code:
_                                      =   (
                                        255,
                                      lambda
                               V       ,B,c
                             :c   and Y(V*V+B,B,  c
                               -1)if(abs(V)<6)else
               (              2+c-4*abs(V)**-0.4)/i
                 )  ;v,      x=1500,1000;C=range(v*x
                  );import  struct;P=struct.pack;M,\
            j  ='<QIIHHHH',open('M.bmp','wb').write
for X in j('BM'+P(M,v*x*3+26,26,12,v,x,1,24))or C:
            i  ,Y=_;j(P('BBB',*(lambda T:(T*80+T**9
                  *i-950*T  **99,T*70-880*T**18+701*
                 T  **9     ,T*i**(1-T**45*2)))(sum(
               [              Y(0,(A%3/3.+X%v+(X/v+
                               A/3/3.-x/2)/1j)*2.5
                             /x   -2.7,i)**2 for  \
                               A       in C
                                      [:9]])
                                        /9)
                                       )   )

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
i'm always a fan of seeing some fifteen line comment justifying why something works in some brain damaged way

because then i know that the issue i'm investigating is probably caused by the code that immediately follows and all i have to do is assume the comment is actually wrong

Soricidus
Oct 21, 2010
freedom-hating statist shill
my favorite is when i look at outsourced code and find it's full of comments saying things like "XXX how does this work"

PleasureKevin
Jan 2, 2011

https://www.youtube.com/watch?v=UNzqBW8132s

Base Emitter
Apr 1, 2012

?

Dessert Rose posted:

i'm always a fan of seeing some fifteen line comment justifying why something works in some brain damaged way

because then i know that the issue i'm investigating is probably caused by the code that immediately follows and all i have to do is assume the comment is actually wrong

the only accurate comment ever to exist is

// TODO

qntm
Jun 17, 2009
some 470 of our source files start with

code:
// Description: A brief description of the contents of the file.
//              Details for each included class and method are
//              provided with that class and method.
and indeed every single method in the codebase is meticulously commented, like so

code:
//******************************************************************************
//
// SomethingSomethingClass::getButts() Method Implementation
//
//******************************************************************************
Butts* SomethingSomethingClass::getButts()
{

...

}

Squinty Applebottom
Jan 1, 2013

when you minify and gzip it shouldnt be that bad tbh but it seems a little silly

qntm
Jun 17, 2009

Squinty Applebottom posted:

when you minify and gzip it shouldnt be that bad tbh but it seems a little silly

why would we minify and gzip C++ code

Brain Candy
May 18, 2006

qntm posted:

cargo cult comments

no one should comment anything because you work with at least one person that should be flipping burgers instead of making decisions about code

Brain Candy
May 18, 2006

no one should test anything because lazy people write awful tests

no one should use an IDE because morons will autogenerate a bunch of dumb poo poo

no one should use objects because the incurious will just make structs everywhere

no one should use concurrency because your manager can't understand concurrency

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Bloody posted:

fun fact about this garbage 8051 im suffering with the register write to enter sleep mode only works if the instruction writing it is not aligned to a 4-byte boundary so you can just guess how much fun that bullshit is.

which 8051 vendor made this thing? the only current one i know of is silabs

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
Regarding "Software "Engineering""

Common approaches to given types of problems exist. We all know about picking one data structure over another, or one algorithm over another; there are tradeoffs of speed versus memory, or what you do well versus what you don't do so well.

Architecturally there are tradeoffs between enterprise level OOP with multiple tiers and classes all over the place passing objects versus data centric stuff versus FP stuff vs fart out a script for this trivial poo poo. Depending on scale and risk and importance we also have different levels of testing and scrutiny and code review - Theracs are going to get a LOT of scrutiny, kernels are going to have to strictly follow guides and be tested as much as you can, VMs are more important than farty fart ding dong web server, etc.

While that's not "make a bridge" engineering, in that nobody is mixing and testing concrete, or pouring poo poo and tugging on cables and rebar, or hooking up harnesses to people so they don't fall and die, there's plenty of "we need good practices" engineering, and plenty of "let's pick one approach vs another based on the problem to solve" decision making, much like causeway vs cable stay vs suspension, and such. You can't really do FEA on your porn site's source code but you sure can load test servers, and so on.

If documenting and following standards, planning things and 'architecting' design, and figuring out how to approach things based on what we already know isn't engineering, what would you call it?

Brain Candy
May 18, 2006

2banks1swap.avi posted:

Regarding "Software "Engineering""

Common approaches to given types of problems exist. We all know about picking one data structure over another, or one algorithm over another; there are tradeoffs of speed versus memory, or what you do well versus what you don't do so well.

Architecturally there are tradeoffs between enterprise level OOP with multiple tiers and classes all over the place passing objects versus data centric stuff versus FP stuff vs fart out a script for this trivial poo poo. Depending on scale and risk and importance we also have different levels of testing and scrutiny and code review - Theracs are going to get a LOT of scrutiny, kernels are going to have to strictly follow guides and be tested as much as you can, VMs are more important than farty fart ding dong web server, etc.

While that's not "make a bridge" engineering, in that nobody is mixing and testing concrete, or pouring poo poo and tugging on cables and rebar, or hooking up harnesses to people so they don't fall and die, there's plenty of "we need good practices" engineering, and plenty of "let's pick one approach vs another based on the problem to solve" decision making, much like causeway vs cable stay vs suspension, and such. You can't really do FEA on your porn site's source code but you sure can load test servers, and so on.

If documenting and following standards, planning things and 'architecting' design, and figuring out how to approach things based on what we already know isn't engineering, what would you call it?

a clown show for mental children as long as no one goes to jail or out of business for making easily preventable mistakes

Brain Candy
May 18, 2006

and even more, as long as nobody seriously asks what the total cost of ownership is for this project during its lifetime? how long would that be? how will it be maintained? you don't have engineering, you have meetings to make you feel like grown ups.

double sulk
Jul 2, 2010

Watching Dave Thomas speak about Elixir right now :unsmigghh:

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

double sulk posted:

Watching Dave Thomas speak about Elixir right now :unsmigghh:

ARISE FROM THE GRAVE, HAMBURGER MAN

Adbot
ADBOT LOVES YOU

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
Never trust anybody with a first name as a last name.

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