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
gangnam reference
Dec 26, 2010

shut up idiot shut up idiot shut up idiot shut up idiot
*picks sniep at random*

Adbot
ADBOT LOVES YOU

NeoHentaiMaster
Jul 13, 2004
More well adjusted then you'd think.

Toady posted:

like in that free stanford introductory course on youtube/itunes u, the students started out writing statements to move a sprite on screen, and the day the curtains were pulled and the java was exposed, the students had a ton of questions as they tried to reconcile what they were doing before with this weird new thing. the professor had to forcefully end the questions so he could move on

Ugh, I remember watching that. As soon as he introduced the sprite robot thing I knew where he was going and I also knew that no one who doesn't already understand OO is going to understand that.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

Toady posted:

i would think java would be a bad language to teach programming with because high-level concepts like classes are forced onto people before they know how to program

like in that free stanford introductory course on youtube/itunes u, the students started out writing statements to move a sprite on screen, and the day the curtains were pulled and the java was exposed, the students had a ton of questions as they tried to reconcile what they were doing before with this weird new thing. the professor had to forcefully end the questions so he could move on

maybe like you shouldn't start with moving graphics, a super complicated concept

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

tef posted:

*rides nop-sled into a building*

:getin: baby

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

loooool

Toady
Jan 12, 2009

Sweeper posted:

maybe like you shouldn't start with moving graphics, a super complicated concept

it was this:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/738b7897-cd38-4f24-9f05-48dd69116837/entry/karel_the_robot_learns_java5?lang=en

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

haha

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

fidel sarcastro posted:

it's a pain to read

of course, so is the opposite extreme so i'm not condoning perl/ruby one-liners either

I find excessive terseness a worse vice than excessive verboseness, ymmv

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

rotor posted:

I find excessive terseness a worse vice than excessive verboseness, ymmv

same, i'd rather use dhh variable/method names than "x" or "idx":

Many programmers have a natural preference for short variable and method names. I doubt many would recognize this preference as a trade of brevity for clarity, but that’s often exactly the result. This is especially true if you subscribe to the ridiculous Church of 80-character Lines.

It need not be that way. Writing terse code can be a joy even if you spell things out in abundant detail. Modern programming languages are expressive enough that what you save in laborious boilerplate can be spent on clarity — and you’ll still have plenty of lines left over for a dance.

And most certainly, you’ll hardly ever need to abbreviate anything. I cringe when I see ext for extension, cp for copy, or worse, application-specific abbreviations sure to be forgotten two months after you left the project.

At times being exceedingly clear will seem almost silly at first glance. The name of the method or variable can be longer than the operation being performed! But the silliness quickly dissipates the first time you return to a piece of code and know exactly what it does.

Here are a few examples of long method names from the new Basecamp code base:
Ruby code:
def make_person_an_outside_subscriber_if_all_accesses_revoked
  person.update_attribute(:outside_subscriber, true) if person.reload.accesses.blank?
end

def shift_records_upward_starting_at(position)
  positioned_records.update_all "position = position - 1",
    ["position >= ?", position]
end

def someone_else_just_finished_writing?(document)
  if event = document.current_version_event
    !event.by_current_creator? and event.updated_at > 1.minute.ago
  end
end
If you work hard at being clear in your naming, you’ll also rarely need to write comments for the code. Comments are generally only needed when you failed to be clear enough in naming. Treat them as a code smell.

Opinion Haver
Apr 9, 2007

Cocoa Crispies posted:

Comments are generally only needed when you failed to be clear enough in naming. Treat them as a code smell.

i found it, the worst opinion

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
nope

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
I mean I'm not sure as I agree with it altogether but we've seen waaaay worse

FamDav
Mar 29, 2008
The worst language is the one created by you, the programmer.

EDIT: I'm all for "concise and meaningful".

Shaggar
Apr 26, 2006

i barely GNU her! posted:

python makes me think!!! its so bad!!! - shagger

yeah lets have people step through your program every time they want to figure out what its doing. thats super awesome.

Shaggar
Apr 26, 2006
sounds like a great idea for a toy language enthusiast. lets spend all our time taking it apart to see what it does! no one needs to solve real problems!

Opinion Haver
Apr 9, 2007

rotor posted:

I mean I'm not sure as I agree with it altogether but we've seen waaaay worse

if your code is just passing objects around then i agree comments shouldn't be necessary but if you're doing anything weird then comments are a godsend

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

yaoi prophet posted:

if your code is just passing objects around then i agree comments shouldn't be necessary but if you're doing anything weird then comments are a godsend

:raise:

Opinion Haver
Apr 9, 2007


i had to write some really janky logic for my internship over the past summer because it was in a domain that doesn't really have any nice solutions, so i documented the hell out of it so people could understand how it worked

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

yaoi prophet posted:

i had to write some really janky logic for my internship over the past summer because it was in a domain that doesn't really have any nice solutions, so i documented the hell out of it so people could understand how it worked

thats good and everything but i dont see how it has any bearing on the subject at hand

Max Facetime
Apr 18, 2009

tef posted:

the implication is that 'solving a hard problem' is people who can 'not invented here' up some savagely optimised algorithms to do it. I then mention several actual hard problems which are not covered by these algorithmic blinkers.

What, so this list

tef posted:

Learning a new API is hard. Debugging is hard. Documentation is hard. Testing is hard. Builds are hard. Versioning is hard.

is supposed to be ACTUALLY hard problems? that just makes the whole thing even dumber

Learning a new API is only hard if the thing the API does is actually hard or the API is done in an unnecessarily hard way.
Debugging is only hard if your code doing what you want doesn't include "fails reliably".
Documentation is only hard if the interface to your code is done in an unnecessarily hard way.
Testing is only hard if you are having trouble expressing what you want your code to do.
Builds are only hard if you insist on coding and producing an executable to be two separate activities.
Versioning is only hard if tomorrow you don't want doing what you want to include doing something reasonable with the stuff you wanted done today.

But never mind all that stuff that requires someone to figure out what is it that the code must do, coding is just mashing out some dumb code from logic and libraries

het
Nov 14, 2002

A dark black past
is my most valued
possession
well you see at my internship I painted this bike shed, let me fill you in on what I learned about proper bike shed painting

tef
May 30, 2004

-> some l-system crap ->

Win8 Hetro Experie posted:

What, so this list


is supposed to be ACTUALLY hard problems? that just makes the whole thing even dumber

yep.

Win8 Hetro Experie posted:

Learning a new API is only hard if the thing the API does is actually hard or the API is done in an unnecessarily hard way.

*learns cross platform toolkit* *find out all the ways it isn't cross platform*

quote:

Debugging is only hard if your code doing what you want doesn't include "fails reliably".

Debugging a multi-threaded program is hard. Debugging often involves reverse engineering.

Or do you only have to find the bugs in your own code? How fortunate.

quote:

Documentation is only hard if the interface to your code is done in an unnecessarily hard way.

We like to say that documentation is easy and developers are lazy, but I have found scant good documentation, so I have come to the conclusion that good documentation is hard, by virtue of it's rarity

quote:

Testing is only hard if you are having trouble expressing what you want your code to do.

And yet many of the tests I have encountered have been non-deterministic.

quote:

Builds are only hard if you insist on coding and producing an executable to be two separate activities.

this is the point where I give up trying to guess what you're saying and just continue being anecdotally yours.

quote:

Versioning is only hard if tomorrow you don't want doing what you want to include doing something reasonable with the stuff you wanted done today.

i'm pretty sure you were raging so hard, you forgot to make a sentence with words that follow each other.

quote:

But never mind all that stuff that requires someone to figure out what is it that the code must do, coding is just mashing out some dumb code from logic and libraries

my point is that people look for skills within an algorithmic domain, yet many of the ancillary skills are harder and rarer.

i can only assume you live in a magical land where the build system isn't cobbled together, the test suite is as polished as if it came from jonny ive's bumhole, debugging requires no reverse engineering, and deployments and version conflicts are simply the users error and/or problem.

tef fucked around with this message at 00:55 on Sep 12, 2012

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Shaggar posted:

yeah lets have people step through your program every time they want to figure out what its doing. thats super awesome.

sanely named variables are great for setting breakpoints in perls debugger

i dont even know whos trolling who any more

tef
May 30, 2004

-> some l-system crap ->

het posted:

well you see at my internship I painted this bike shed, let me fill you in on what I learned about proper bike shed painting

me, I learned everything I know about programming from working in a bakery

tef
May 30, 2004

-> some l-system crap ->

Win8 Hetro Experie posted:

coding is just mashing out some dumb code from logic and libraries

coding is just writing bugs

Sneaking Mission
Nov 11, 2008

Jonny 290 posted:

i dont even know whos trolling who any more

trolloboros

Max Facetime
Apr 18, 2009

tef posted:

i can only assume you live in a magical land where the build system isn't cobbled together, the test suite is as polished as if it came from jonny ive's bumhole, debugging requires no reverse engineering, and deployments and version conflicts are simply the users error and/or problem.

no, but I recognize that any problems with these are self-inflicted and stem from them not being considered part of the software product from the beginning

"write some dumb code because coding is mostly trivial" certainly doesn't help

E:

tef posted:

i'm pretty sure you were raging so hard, you forgot to make a sentence with words that follow each other.

I actually read over that one quite a few times to make sure it was syntactically correct

Catalyst-proof
May 11, 2011

better waste some time with you

Win8 Hetro Experie posted:

I actually read over that one quite a few times to make sure it was syntactically correct

'but it's syntactically correct' is the worst defense for writing a poorly written sentence

tef
May 30, 2004

-> some l-system crap ->

Win8 Hetro Experie posted:

no, but I recognize that any problems with these are self-inflicted and stem from them not being considered part of the software product from the beginning

yep. it turns out that software is easy when you get everything right first time.


quote:

"write some dumb code because coding is mostly trivial" certainly doesn't help

some people like to use fancy bits of coding to avoid an extra line or variable.
this pops up all the time in coc: "I have this 3 line statement that's really clear and obvious, but I want to write something smaller and cleverer".


quote:

I actually read over that one quite a few times to make sure it was syntactically correct

i had to repunctuate that garden path sentence before I understood you.

versioning includes backwards compatibility issues and migration issues. huh

Max Facetime
Apr 18, 2009

WHOIS John Galt posted:

'but it's syntactically correct' is the worst defense for writing a poorly written sentence

in criticizing others for missing the big picture I may focused too much on trivialities myself

isn't that ironic

tef posted:

yep. it turns out that software is easy when you get everything right first time.

or failing that, getting everything right to make software easier is an actual priority

tef posted:

some people like to use fancy bits of coding to avoid an extra line or variable.
this pops up all the time in coc: "I have this 3 line statement that's really clear and obvious, but I want to write something smaller and cleverer".

there's a lot of that going around, I think quite a few people in the 'pos would rather turn this

homercles posted:

Java code:
  private static <T extends Encodable & Decodable<? super T> & Comparable<? super T>> void diffMerge(
    T trafExisting, DataInputStream fhExisting,
    T trafUpdate, DataInputStream fhUpdate,
    DataInputStream fhDiff)
  {
      // simple stuff can be made hard in java
  } 

into this

JavaScript code:
function diffMerge(trafExisting, fhExisting, trafUpdate, fhUpdate, fhDiff) 
{
  // ah, sweet serenity (where did i put my notes?)
}
(the first one is a private implementation detail so i'm not gonna say it's badly designed)

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

tef posted:

lisp makes you an rear end in a top hat programmer. you're encouraged and enabled to write your own language for each problem, thus isolating you in a world of your own views and ideas. it's a babelian tar pit, luring programmers to their doom.

being your own tin pot dictator is quite alluring. you get to go to great feats and neat hacks to get code working. to control and manipulate the code to allow you to write what you want. every new macro and construct shapes the product in your own image and ideals, subsequently alienating other programmers.

it's like these language revisionist cranks who want to replace english with their own little concoction that's just ever so perfect and logical. a complete ignorance of social factors.

anecdotally, I know of large scale codebases and products in simpler, less elegant languages, meanwhile lisp seems to be popular with the lone hacker aesthetic.

eventually, with enough practice, you get to the smug lisp rear end in a top hat stage.

this is where you wonder why lisp is unpopular, or fragmented, but assume that it's simply too good for the populace. Classics like 'worse is better' struggle with the notion that lisp maybe isn't that good. Sometimes you get a naggum complex and trot out saphir-whorf. Other people are terrible and that is why they don't use lisp.

it can't be that lisp isn't a great idea. or macros aren't a great tradeoff. at least the ruby community is coming to terms with monkey patching coming at the expense of library conflicts.

lisp is a strange beast. a simple tool that encourages complexity. purity over utility. a perfect goo waiting for the next hero to shape it and return to the mortal plain with their new, perfect macros.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
tef owns

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Win8 Hetro Experie posted:

there's a lot of that going around, I think quite a few people in the 'pos would rather turn this

Java code:
  private static <T extends Encodable & Decodable<? super T> & Comparable<? super T>> void diffMerge(
    T trafExisting, DataInputStream fhExisting,
    T trafUpdate, DataInputStream fhUpdate,
    DataInputStream fhDiff)
  {
      // simple stuff can be made hard in java
  } 
into this

JavaScript code:
function diffMerge(trafExisting, fhExisting, trafUpdate, fhUpdate, fhDiff) 
{
  // ah, sweet serenity (where did i put my notes?)
}
(the first one is a private implementation detail so i'm not gonna say it's badly designed)

i legit have no idea what the signature means for either one but i'm also gonna say that there's five fuckin' arguments, so it probably needs to be an object with methods and instance variables and not just a class method

basically if your function takes five arguments you forgot some

Sneaking Mission
Nov 11, 2008

i used lisp once in school and it was pretty neat thats my lisp story alt.comp.lang.stories

tef
May 30, 2004

-> some l-system crap ->

Win8 Hetro Experie posted:

in criticizing others for missing the big picture I may focused too much on trivialities myself

isn't that ironic

i find it more you read my posts with a view to dissect them for faults, over letting me away with my more general, vague point made through fanciful word choice and handwaving.

quote:

or failing that, getting everything right to make software easier is an actual priority

again, you're making the point that you seem to be missing from my posts. the challenge and difficulty from software come from people, not from algorithms, nor data structures.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
the number one cause of software project failure is bad requirements gathering.

poo poo's got nothing to do with languages. the problem is that people dont loving know what they want until they see it.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

rotor posted:

the number one cause of software project failure is bad requirements gathering.

poo poo's got nothing to do with languages. the problem is that people dont loving know what they want until they see it.

prototyyyyyyypes

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
the entire point of all the various agile methodologies is to fix ameliorate the problem of bad requirements gathering.

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

rotor posted:

the entire point of all the various agile methodologies is to fix ameliorate the problem of bad requirements gathering.

agile just means you get to hit a moving target instead of a fixed one

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Sweeper posted:

agile just means you get to hit a moving target instead of a fixed one

no, agile recognizes that all targets are in fact moving regardless of what some spec sheet may tell you and tries to enable you to hit the moving targets.

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