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
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Lumpy posted:

So one of our favorite derails has been settled. Turns out doing_it_like_this is easier on the eye and faster to read thanDoingItLikeThis.

An Eye Tracking Study on camelCase and under_score Identifier Styles

Well, they are both better than \doingitlikethis as you get in LaTeX.

(It's good that people are coming up with actual evidence for using one thing over another, maybe people doing that kind of thing will reduce the number of stupid arguments we get about ~coding styles~.)

Adbot
ADBOT LOVES YOU

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
You are naive if you think objective measurements will change people's opinions.

Ganondork
Dec 26, 2012

Ganondork

bucketmouse posted:

Oh the horror stories I could tell about one of my upper division cs professors. Have you ever calculated a md5 by hand, on paper? I have.

If it makes the course more difficult, it's a more valuable program, right?

Bongo Bill
Jan 17, 2012

I'm glad that study exists, because now it means I have a reason to pick a style and stick with it in solo projects.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Even tech companies that have been around forever don't do passwords right:



Granted, 16 is a lot better than 8, but why the hell is there a cap anyway? It's just going to be hashed (hopefully) so it's not like you're going to be burning storage space with longer passwords.

Lain Iwakura
Aug 5, 2004

The body exists only to verify one's own existence.

Taco Defender

Bognar posted:

Even tech companies that have been around forever don't do passwords right:



Granted, 16 is a lot better than 8, but why the hell is there a cap anyway? It's just going to be hashed (hopefully) so it's not like you're going to be burning storage space with longer passwords.

A limit on password length DOES make sense but only from a computational standpoint. There is no logical reason to forbid a 256 character password other than if you're using a lovely cipher. With that said, lovely ciphers are those that are not bcrypt or scrypt for example.

Crosscontaminant
Jan 18, 2007

I wouldn't recommend bcrypt without pointing out that it truncates excessively-long passphrases which is an awfully subtle trap compared to PBKDF2 which seems to just work.

Crosscontaminant fucked around with this message at 16:58 on Aug 30, 2013

Freakus
Oct 21, 2000
Here's to magically breaking APIs and no interest in figuring out what the gently caress is wrong with it.

Seriously. We have a site where we need to create product orders through a 3rd party api. Said api randomly breaks, and once it breaks, it will always fail until they do something about it. When we let them know it breaks, it's a series of "I've restarted it, is it fixed/no it isnt fixed" emails. Sometimes it takes up to 20 restarts before its magically fixed. Sometimes it magically breaks again after we send just a couple orders over. And this has been going on for half a year. The last couple months it happens at least 2 times/week.

EntranceJew
Nov 5, 2009

Freakus posted:

Here's to magically breaking APIs and no interest in figuring out what the gently caress is wrong with it.

Seriously. We have a site where we need to create product orders through a 3rd party api. Said api randomly breaks, and once it breaks, it will always fail until they do something about it. When we let them know it breaks, it's a series of "I've restarted it, is it fixed/no it isnt fixed" emails. Sometimes it takes up to 20 restarts before its magically fixed. Sometimes it magically breaks again after we send just a couple orders over. And this has been going on for half a year. The last couple months it happens at least 2 times/week.

I would consider finding a new 3rd party.

Coffee Mugshot
Jun 26, 2010

by Lowtax
Wow, someone doesn't write tests. 20 restarts is a whole lot of money lost. Are you the only user or something?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Are you paying them money? If you are, then what the hell are you doing giving them money without having an actionable SLA?

The Gripper
Sep 14, 2004
i am winner
I can almost guarantee that if they are paying money, there's a more reliable service at the same price (likely even better value with the SLA) too.

Ditch that poo poo unless you're absolutely forced to keep it, downtime in a purchasing/product order environment can cost a lot more than the obvious "x number of sales were delayed" metric.

The Insect Court
Nov 22, 2012

by FactsAreUseless

Lumpy posted:

So one of our favorite derails has been settled. Turns out doing_it_like_this is easier on the eye and faster to read thanDoingItLikeThis.

An Eye Tracking Study on camelCase and under_score Identifier Styles

I've always preferred snake_case(it's Pythonic and therefore superior) but it's annoying when working with camelCased libraries, combining those with snake_case just looks off to me. Although maybe it's a good thing that it's a quick visual way to distinguish between library code and my code.

Would be interesting to see a similar study done on colorschemes and fonts just to see if there's a significant productivity/performance difference assuming a non-insane choice.

Hughlander
May 11, 2005

Bognar posted:

Even tech companies that have been around forever don't do passwords right:



Granted, 16 is a lot better than 8, but why the hell is there a cap anyway? It's just going to be hashed (hopefully) so it's not like you're going to be burning storage space with longer passwords.

They use a block cypher that takes 128 bits, and a previous implementation ran multiple blocks but their new one only uses one?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I wrote something that was supposed to be like 20 lines of python and run from the command line. Who needs tests for that?

It's slowly morphed in to a few thousands lines of code, running on two servers communicating over a REST API, and still no tests.

I hate myself.

Opinion Haver
Apr 9, 2007

Just remember, ABC. Always Be Ctesting.

Freakus
Oct 21, 2000
I don't know what the original arrangement is, we've been with them for about 10 years now. We're the only ones using this particular api, and we don'thave nearly as much trouble with the other ones of theirs we use. It's their products we're selling, we just get a cut of it.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

yaoi prophet posted:

Just remember, ABC. Always Be Ctesting.

After Building, Check! :eng101:

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

Sticky Profits posted:

From the syllabus:


I hope one of the lectures is on those security reasons.

Alice enters class on time, looks at the quiz, and goes to the bathroom. In the bathroom, Alice texts Bob, outside, with the quiz questions. Bob looks at the text(s), finds the answers, and texts them back. Alice and Bob (re-)enter the classroom and ace the quiz.

Easy.

Lumpy posted:

So one of our favorite derails has been settled. Turns out doing_it_like_this is easier on the eye and faster to read thanDoingItLikeThis.

An Eye Tracking Study on camelCase and under_score Identifier Styles

Having read through this, I appreciate the work the authors put into establishing statistical significance, but I still have a very hard time taking a study of 15 people seriously.

ephphatha
Dec 18, 2009




code:
open <file>
while true
  read from <file>
  if <eof>
    break
    close <file>
  end-if
  ! do work with <file>
end-while
Sure, leaving a file handle open isn't going to kill someone but this bug has lasted 16 years and at least 8 developers without being spotted...

shrughes
Oct 11, 2008

(call/cc call/cc)
I am a MUMPS programmer -- Ask me anything

redleader
Aug 18, 2005

Engage according to operational parameters
On the subject of MUMPS, here's another specialized business language.

Slash
Apr 7, 2011

bucketmouse posted:

A bit of a derail, but does anyone know a good standalone XML doc generator for C++? I'm staring at something like 200 completely undocumented lua-c bindings and beginning to feel nauseous.


Oh the horror stories I could tell about one of my upper division cs professors. Have you ever calculated a md5 by hand, on paper? I have.

We use doxygen at work for generating documentation from c++.
http://www.stack.nl/~dimitri/doxygen/

it is
Aug 19, 2011

by Smythe

redleader posted:

On the subject of MUMPS, here's another specialized business language.

That sure is special, all right
How is your first thought when you see that not to make mnemonics for all those numbers?

dc3k
Feb 18, 2003

what.
This is the kind of poo poo you come across frequently in the hobbyist (Arduino) community. Everything is an unreadable unmaintainable poorly formatted loving mess.

code:
    //DRAW THE INPUT
    boolean drawLine=true;
    stroke(255,0,0);
    int Y1 = InputData[i];
    int Y2 = InputData[i+1];

    y1Above = (Y1>inputHeight);                     // if both points are outside 
    y1Below = (Y1<0);                               // the min or max, don't draw the 
    y2Above = (Y2>inputHeight);                     // line.  if only one point is 
    y2Below = (Y2<0);                               // outside constrain it to the limit, 
    if(y1Above)                                     // and leave the other one untouched.
    {                                               //
      if(y2Above) drawLine=false;                   //
      else if(y2Below) {                            //
        Y1 = (int)inputHeight;                      //
        Y2 = 0;                                     //
      }                                             //
      else Y1 = (int)inputHeight;                   //
    }                                               //
    else if(y1Below)                                //
    {                                               //
      if(y2Below) drawLine=false;                   //
      else if(y2Above) {                            //
        Y1 = 0;                                     //
        Y2 = (int)inputHeight;                      //
      }                                             //
      else Y1 = 0;                                  //
    }                                               //
    else                                            //
    {                                               //
      if(y2Below) Y2 = 0;                           //
      else if(y2Above) Y2 = (int)inputHeight;       //
    }                                               //

    if(drawLine)
    {
      line(X1,Y1+inputTop, X2, Y2+inputTop);
    }
Seriously, who the gently caress puts comments like this? Any change to the code (to fix the horrendous style or to make changes) makes it even worse than it already is...

EntranceJew
Nov 5, 2009

status posted:

Seriously, who the gently caress puts comments like this? Any change to the code (to fix the horrendous style or to make changes) makes it even worse than it already is...

Looks like someone was brought up on assembly.

dc3k
Feb 18, 2003

what.

EntranceJew posted:

Looks like someone was brought up on assembly.

Even in assembly I don't often see large chunks of code with ; and no actual comment after it though.

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

redleader posted:

On the subject of MUMPS, here's another specialized business language.

To be fair, it sounds like it was a glorified low-level VM language not meant for human consumption, only the tooling was so bad they made the decision to program it directly.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

EntranceJew posted:

Looks like someone was brought up on assembly.
More like they were brought up on HDLs because they're writing the routine as a switched register transfer bus.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

status posted:

This is the kind of poo poo you come across frequently in the hobbyist (Arduino) community. Everything is an unreadable unmaintainable poorly formatted loving mess.

code:
    //DRAW THE INPUT
    boolean drawLine=true;
    stroke(255,0,0);
    int Y1 = InputData[i];
    int Y2 = InputData[i+1];

    y1Above = (Y1>inputHeight);                     // if both points are outside 
    y1Below = (Y1<0);                               // the min or max, don't draw the 
    y2Above = (Y2>inputHeight);                     // line.  if only one point is 
    y2Below = (Y2<0);                               // outside constrain it to the limit, 
    if(y1Above)                                     // and leave the other one untouched.
    {                                               //
      if(y2Above) drawLine=false;                   //
      else if(y2Below) {                            //
        Y1 = (int)inputHeight;                      //
        Y2 = 0;                                     //
      }                                             //
      else Y1 = (int)inputHeight;                   //
    }                                               //
    else if(y1Below)                                //
    {                                               //
      if(y2Below) drawLine=false;                   //
      else if(y2Above) {                            //
        Y1 = 0;                                     //
        Y2 = (int)inputHeight;                      //
      }                                             //
      else Y1 = 0;                                  //
    }                                               //
    else                                            //
    {                                               //
      if(y2Below) Y2 = 0;                           //
      else if(y2Above) Y2 = (int)inputHeight;       //
    }                                               //

    if(drawLine)
    {
      line(X1,Y1+inputTop, X2, Y2+inputTop);
    }

Seriously, who the gently caress puts comments like this? Any change to the code (to fix the horrendous style or to make changes) makes it even worse than it already is...

I'm not defending this particular style, but it looks like the empty comments signify the code described by the nonempty comment at the top. Like #region in C#.

weird
Jun 4, 2012

by zen death robot

pokeyman posted:

I'm not defending this particular style, but it looks like the empty comments signify the code described by the nonempty comment at the top. Like #region in C#.

Huh, I had no idea why they did that when I first saw it, but now that you mention it, I've done the same thing when writing assembler. I think it makes sense there; it just looks bizarre in C.

dc3k
Feb 18, 2003

what.

pokeyman posted:

I'm not defending this particular style, but it looks like the empty comments signify the code described by the nonempty comment at the top. Like #region in C#.

Yeah, that's definitely the reason. Could have gone about it a bit better though.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

status posted:

Seriously, who the gently caress puts comments like this? Any change to the code (to fix the horrendous style or to make changes) makes it even worse than it already is...

That's easy to fix, just put the comments before the code. :v:

Jewel
May 2, 2009

This tweet:

https://twitter.com/0x17h/status/374818579339698176 posted:

github search is the gift that keeps on giving https://github.com/search?q=id_rsa+in:path&type=Code&ref=searchresults (thanks @casiotone!)

:allears:

Edit: Someone pointed out the description of this one:

https://github.com/philchristensen/txsftp posted:

☣ A highly secure SFTP implementation, supporting virtualized users, a chroot'ed environment, automatic GPG encryption and VPN detection.

:gonk:

Jewel fucked around with this message at 15:12 on Sep 3, 2013

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

Thermopyle posted:

I wrote something that was supposed to be like 20 lines of python and run from the command line. Who needs tests for that?

It's slowly morphed in to a few thousands lines of code, running on two servers communicating over a REST API, and still no tests.

I hate myself.

Never show a business person a working prototype because that poo poo will become production before you can sit down.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Monkeyseesaw posted:

Never show a business person a working prototype because that poo poo will become production before you can sit down.

This is the story of one of our nearly unmaintainable applications. We stood up a staging site for them to poke around at and make suggestions/critiques. A day later they sent us an e-mail saying "Looks great, we've already got 5 clients using it!" :cripes:

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Bognar posted:

This is the story of one of our nearly unmaintainable applications. We stood up a staging site for them to poke around at and make suggestions/critiques. A day later they sent us an e-mail say "Looks great, we've already got 5 clients using it!" :cripes:

We had a client sneak a development build into production by putting it in an iframe on their live site. Without telling us, of course.

Freakus
Oct 21, 2000

Monkeyseesaw posted:

Never show a business person a working prototype because that poo poo will become production before you can sit down.
I always create "working" prototypes. As in, it obviously breaks in some ways. If people ask, I just say "it's a prototype, it's not worth fixing that issue when we're going to throw it away anyways." Prototype isn't meant to be perfect anyways, the problem is in making it appear perfect to people when it isn't.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

DaTroof posted:

We had a client sneak a development build into production by putting it in an iframe on their live site. Without telling us, of course.

Welp, I just added a clause to my standard contract form.

Adbot
ADBOT LOVES YOU

bucketmouse
Aug 16, 2004

we con-trol the ho-ri-zon-tal
we con-trol the verrr-ti-cal

redleader posted:

On the subject of MUMPS, here's another specialized business language.

That lead me indirectly to this.

https://github.com/jloughry/BANCStar/blob/master/C16LNAPP.pdf?raw=true

:psyduck:

e: if nothing else, ctrl-f "Interesting features" on that page
e2: whoops wrong link

bucketmouse fucked around with this message at 19:47 on Sep 4, 2013

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