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
Zlodo
Nov 25, 2006

Doc Block posted:

this x1000

[object pleaseDoAThingWith:[SomeClass objectWithFile:filename]];

is so much better than C++.

I always chuckle when C++ programmers complain about objective C's use of square brackets while C++ code looks like someone just randomly mashed the angle bracket, colon, and underscore keys on their keyboard.

you only get unreadable messes of angle brackets / colons if you dont use typedefs/using to factor poo poo out properly
its no different than people making 3000 line functions or classes with 300 methods or 10k line source files, dont blame the language bc some people arent able to use the tools it provides to decompose things into manageable parts

Adbot
ADBOT LOVES YOU

PrBacterio
Jul 19, 2000

Zlodo posted:

you only get unreadable messes of angle brackets / colons if you dont use typedefs/using to factor poo poo out properly
its no different than people making 3000 line functions or classes with 300 methods or 10k line source files, dont blame the language bc some people arent able to use the tools it provides to decompose things into manageable parts

well you seem to have forgotten that this is the terrible programmer safe zone, not the "great programmers who know how to restrain themselves from abusing language features to hell and back" hideout



also defending terrible languages that offer a million different, mutually inconsistent ways to do things by saying "well dont do it in those millions of different ways then, just stick to one consistent subset of the language, DUH!" is a terrible and lazy cop-out, not all parts of any given program are always written by or under the control of the same person you know
and even ostensibly "well-designed" and widely-approved C++ libraries like boost are in many ways hideously freakish nightmare creations of hack heaped upon hack and hundreds of #define's to bend the language to fit some madman's design paradigm

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

PrBacterio posted:





hideously freakish nightmare creations of hack heaped upon hack and hundreds of #define's to bend the language to fit some madman's design paradigm


if this is wrong why bother programming?

Brain Candy
May 18, 2006

so, apparently some non-devs (but still in sperglandia, obv.) read my commit messages/comments for fun. am I the worst or almost the worst?

Mr SuperAwesome
Apr 6, 2011

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

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Brain Candy posted:

so, apparently some non-devs (but still in sperglandia, obv.) read my commit messages/comments for fun. am I the worst or almost the worst?

caring enough to write good commit messages is a good thing

Brain Candy
May 18, 2006

prefect posted:

caring enough to write good commit messages is a good thing

i know i only pretend to be a professional, but i'm influenced by the thought that pros don't let poo poo get to them. sometimes i construct comments out of left over loathing & bile, which i'm sure is always pleasant to read and informative!

so yes, caring is a thing. but i'm still not sure if the best commits should be as dry as the sahara. or maybe as merciless.

zokie
Feb 13, 2006

Out of many, Sweden
don't hold out on us!

Brain Candy
May 18, 2006

welp don't poast while stupid, that's my comment on things

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
can anyone here recommend an app for sketching out class diagrams and shiz?

im architecturin' my first not-absolutely-trivial project and drawing out possible structures w/ pen n paper feels slow

Posting Principle
Dec 10, 2011

by Ralp
omnigraffle. dia if you're poor

Bloody
Mar 3, 2013

what about for real oses

Nomnom Cookie
Aug 30, 2009



coffeetable posted:

can anyone here recommend an app for sketching out class diagrams and shiz?

im architecturin' my first not-absolutely-trivial project and drawing out possible structures w/ pen n paper feels slow

just make classes. u wont figure out how bad ur design is until you try to use it so spend at least 10x as much time coding as designing

Nomnom Cookie
Aug 30, 2009



ofc this asdumes u hace a decent ide and can refactor easily. if not then just give up now

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
pen and paper, but nomnom is right just code and found out what's really broken

Notorious b.s.d.
Jan 25, 2003

by Reene

Bloody posted:

what about for real oses

there are a variety of UML designer snap-ins for eclipse. try a few and see which you hate least


as for UML vs pen and paper: there are definitely times i would have liked to have started using an API with a nice UML diagram to explain it. but i don't know whether UML diagrams will help you design the api BEFORE it exists, i have never tried

Corla Plankun
May 8, 2007

improve the lives of everyone

Bloody posted:

what about for real oses

Posting Principle posted:

dia if you're poor

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

Nomnom Cookie posted:

just make classes. u wont figure out how bad ur design is until you try to use it so spend at least 10x as much time coding as designing

Plastic Snake posted:

pen and paper, but nomnom is right just code and found out what's really broken
yeah im not doing it all up-front, just sketching out some ideas, implementing them, realising what's wrong and then adjusting the implementation + sketch. don't want to try and hold it all in my head b/c if i go do something else for a week, when i come back i'll have forgotten it all.

Posting Principle posted:

omnigraffle. dia if you're poor
dia it is

Shaggar
Apr 26, 2006
vs has a class diagram tool built in.

GameCube
Nov 21, 2006

is it worth learning actual uml ever or am i good just drawing boxes and lines on a piece of paper and losing it before the day's over

Shaggar
Apr 26, 2006
drawing either on paper, whiteboard, or visio is better than uml cause if ur doing uml you could just write the code instead. generally I just think up an overall concept and maybe whiteboard it a bit but then I start building interfaces and models in code because it works better for me.

Posting Principle
Dec 10, 2011

by Ralp
just do boxes if you're doing that kind of upfront design. uml should be autogenerated from your code once you have a stable api

BONGHITZ
Jan 1, 1970

i am bad at memorizing the implementation of things, like binary trees

Nomnom Cookie
Aug 30, 2009



Werthog 95 posted:

is it worth learning actual uml ever or am i good just drawing boxes and lines on a piece of paper and losing it before the day's over

sequence diagrams are good

MrMoo
Sep 14, 2000


cacoo.com is pretty ok, libreoffice draw can read Visio files but I'm not sure I would want to try creating something in it.

Shaggar
Apr 26, 2006

BONGHITZ posted:

i am bad at memorizing the implementation of things, like binary trees

theres no reason to memorize the implementation of common algorithms and data structures and I think if someone asked me in an interview "hey code up a mergesort" i'd probably get up and walk out

Shaggar
Apr 26, 2006
If someone asks me how to sort a list my answer would be
Java code:
Collections.sort(list);

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

theres no reason to memorize the implementation of common algorithms and data structures and I think if someone asked me in an interview "hey code up a mergesort" i'd probably get up and walk out

people actually do this

GameCube
Nov 21, 2006

Shaggar posted:

If someone asks me how to sort a list my answer would be
Java code:
Collections.sort(list);

what if that's the answer they're actually looking for :o

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
isn't that just a stones throw from planging

Shaggar
Apr 26, 2006
thats what it should be. if someone starts asking you to implement a sort like that either they think thats something you should do irl which means they're terrible and you should stay away or (and this is more likely) they read up on "TOP 10 PROGRAMMING INTERVIEW QUESTIONS ASKED BY GOOGLE!!!" and simplified one of their stupid questions. both are signs you might not want to work there.

Shaggar
Apr 26, 2006

USSMICHELLEBACHMAN posted:

isn't that just a stones throw from planging

writing your own sort is p-langing.

MononcQc
May 29, 2007

if they ask it as a way to "prove" you know the language you'll be working in and you don't have code available for them for some reason and/or you weren't working in it lately, it might be acceptable I guess, assuming you understand the basic lines of mergesort.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Shaggar posted:

theres no reason to memorize the implementation of common algorithms and data structures and I think if someone asked me in an interview "hey code up a mergesort" i'd probably get up and walk out

lol if u cant rederive mergesort withou thinking


lol if you have to think about how to implement binary trees in your language

data Tree a = Leaf | Branch a (Tree a) (Tree a) supremacy


but yes if ur not fresh out of college and someone asks u this leave

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
I mean algorithms strike me as being a lot like cryptography where you should never actually roll your own but you should understand how they work for the most part

if not knowing merge sort what about understanding big o and so on

Shaggar
Apr 26, 2006
you should understand if its stable (and what that means) and how fast it is and maybe some of the performance gotchas related to special states of the object before its sorted. anything else is out of scope (unless you're interviewing for a job writing a language, I guess)

Soricidus
Oct 21, 2010
freedom-hating statist shill

USSMICHELLEBACHMAN posted:

I mean algorithms strike me as being a lot like cryptography where you should never actually roll your own
You do realise that "rule" was spread by the NSA to ensure that you'd use something they've put a backdoor in? You can't even just implement a well-known algorithm yourself because you can't trust the compiler. Designing your own crypt is the only way to be sure your secrets are safe from prying eyes.

GameCube
Nov 21, 2006

lol ok where's that from

Nomnom Cookie
Aug 30, 2009



i had to implement quicksort for a take-home coding test as part of interviewing for my current job. did a basic median-of-three thing cause thats what i could recall from algos class five years ago

then i argued with a lead dev about javas handling of null as the sole actual param for a varargs param

then they changed the test because it was "too easy". probably my qsort impl looked like what was on wikipedia. except i didnt look anything up to make mine :smug:

edit: the new test is some async thing that no one has gotten 100% correct. which is about right for doing async w/java

Nomnom Cookie fucked around with this message at 22:55 on Oct 18, 2013

Adbot
ADBOT LOVES YOU

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Soricidus posted:

You can't even just implement a well-known algorithm yourself because you can't trust the compiler.

this is a funny troll

  • Locked thread