Author Topic: Programming memes  (Read 8242 times)

0 Members and 1 Guest are viewing this topic.

Offline T3sl4co1lTopic starter

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Programming memes
« on: May 23, 2018, 08:39:21 pm »




Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: Programming memes
« Reply #1 on: May 24, 2018, 05:04:36 pm »
That's so true it hurts.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Programming memes
« Reply #2 on: May 24, 2018, 05:15:37 pm »
how many programmers do you need to change a lightbulb ?

They can't do it ! its a hardware problem ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: T3sl4co1l

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: be
    • Freelance Hardware Engineer
Re: Programming memes
« Reply #3 on: May 24, 2018, 05:26:33 pm »
 
The following users thanked this post: HackedFridgeMagnet

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Programming memes
« Reply #4 on: May 24, 2018, 06:26:31 pm »


So true... That's a good one!  :-DD
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Programming memes
« Reply #5 on: May 24, 2018, 07:13:35 pm »

Pretty sure I have interviewed that guy, on several occasions, and I am am very much afraid I have hired him once |O



 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1637
  • Country: nl
Re: Programming memes
« Reply #6 on: May 24, 2018, 07:16:20 pm »
 

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: Programming memes
« Reply #7 on: May 24, 2018, 07:35:29 pm »
(Image removed)
Pretty sure I have interviewed that guy, on several occasions, and I am am very much afraid I have hired him once |O

I watch for a skills list 20 items long on the resume. Then I dig into one or two, and inevitably we get an answer something such as, "Yeah, we had LabVIEW, like, for like one semester, and that was, like, really long ago... like a couple years ago."

And so they list it, and so they get rejected. Kind of like parts with bogus datasheets.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Programming memes
« Reply #8 on: May 24, 2018, 11:53:50 pm »
(Image removed)
Pretty sure I have interviewed that guy, on several occasions, and I am am very much afraid I have hired him once |O

I watch for a skills list 20 items long on the resume. Then I dig into one or two, and inevitably we get an answer something such as, "Yeah, we had LabVIEW, like, for like one semester, and that was, like, really long ago... like a couple years ago."

And so they list it, and so they get rejected. Kind of like parts with bogus datasheets.

There's a tension here.

I can learn to use/do almost anything you want, on a time scale that is trivial in the context of a permanent (or even 2 - 3 year) job. I don't have time to learn everything that you *might* want, in advance of getting the job.

But if HR don't see their correct buzzwords listed on your CV then you don't even get the chance for an interview.

Simple example: C, C++, Obj-C, Java, C#, Python, Perl, Ruby, JavaScript, PHP, Kotlin, Scala, Swift, Go, Rust are all so similar that if you can program in one of them (especially if that one is C++ lol) then you can pick up any of the others quickly if you need to. But is anyone expert in *all* of them? Hell, no.

The same with assembly languages. I cut my teeth on 6502, Z80, PDP11, VAX, then moved on to 6809, 68000, PowerPC, MIPS, ARM, ARM64, RISC-V. I've even done .. ugh .. x86 from time to time .. e.g. 18 months ago I crested a simple scheme for on-the-fly mapping RISC-V instructions to x86_84 that outperformed QEMU by a factor of two and often ran RISC-V code on an i7 only 30% slower than gcc optimised native x86 code.

You've got some wacky home-grown programming language or CPU? I'm pretty sure I can cope...

Fortunately, there is a way around lying to the HR drones to get an interview and then being quizzed on stuff you don't actually know: approach the people you'll be working with (especially future supervisor) directly, or at least do something cool that they'll notice, and have THEM come to you and say "Why don't you come to work for us?" and then they *tell* HR to hire you.

My (spare time) work on the above-mentioned RISC-V emulator is one of the things that got the attention of SiFive and led to them hiring me. My work on the Boehm–Demers–Weiser garbage collector led to both Samsung and before them Mozilla offering me earlier jobs. The vast majority of other jobs have come from getting someone to introduce me to their boss.

In 35 years I've only got *one* (1) job via the traditional job agency/CV route. Shotgun sending out of CVs is a mug's game, and heck of a depressing.
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: Programming memes
« Reply #9 on: May 25, 2018, 03:24:58 pm »
Getting back to the memes... Have you seen this one?



(easy one, I'm just posting to get the notifications!)   :-+
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Programming memes
« Reply #10 on: May 25, 2018, 03:34:12 pm »
"Everyone knows that debugging is harder then writing it in the first place, so if you write code as cleverly as you are able, how will you ever hope to debug it?"

I forget who said it, but it is horribly true.

Regards, Dan.
 

Offline nugglix

  • Regular Contributor
  • *
  • Posts: 209
  • Country: de
Re: Programming memes
« Reply #11 on: May 25, 2018, 04:29:51 pm »
It's from Brian W. Kernighan.

See:
http://www.defprogramming.com/quotes-by/brian-w-kernighan/

PS: And it's so damn true...
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Programming memes
« Reply #12 on: May 25, 2018, 04:35:31 pm »
"Everyone knows that debugging is harder then writing it in the first place, so if you write code as cleverly as you are able, how will you ever hope to debug it?"

I forget who said it, but it is horribly true.

Regards, Dan.
Write code in an hour. Debug that weird thing happening for the rest of the day.  :palm:
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Programming memes
« Reply #13 on: May 27, 2018, 09:28:30 pm »


So true... That's a good one!  :-DD
if the arduino was connected to a laptop that has internet : add IoT specialist.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Programming memes
« Reply #14 on: May 27, 2018, 09:31:37 pm »
The new Cray is so fast it can finish an endless loop in just under 4 hours....

The only thing faster than a Cray , is the new Cray.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: Yansi

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Programming memes
« Reply #15 on: May 27, 2018, 11:06:35 pm »
4 hours... nice uptime for a Win 10 box!  :-DD
 

Offline thermistor-guy

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: au
Re: Programming memes
« Reply #16 on: May 28, 2018, 12:53:49 am »
(Image removed)
Pretty sure I have interviewed that guy, on several occasions, and I am am very much afraid I have hired him once |O

I watch for a skills list 20 items long on the resume. Then I dig into one or two, and inevitably we get an answer something such as, "Yeah, we had LabVIEW, like, for like one semester, and that was, like, really long ago... like a couple years ago."

And so they list it, and so they get rejected. Kind of like parts with bogus datasheets.

There's a tension here.

I can learn to use/do almost anything you want, on a time scale that is trivial in the context of a permanent (or even 2 - 3 year) job. I don't have time to learn everything that you *might* want, in advance of getting the job.

But if HR don't see their correct buzzwords listed on your CV then you don't even get the chance for an interview.
...
Fortunately, there is a way around lying to the HR drones to get an interview and then being quizzed on stuff you don't actually know: approach the people you'll be working with (especially future supervisor) directly, or at least do something cool that they'll notice, and have THEM come to you and say "Why don't you come to work for us?" and then they *tell* HR to hire you.

My (spare time) work on the above-mentioned RISC-V emulator is one of the things that got the attention of SiFive and led to them hiring me. My work on the Boehm–Demers–Weiser garbage collector led to both Samsung and before them Mozilla offering me earlier jobs. The vast majority of other jobs have come from getting someone to introduce me to their boss.

In 35 years I've only got *one* (1) job via the traditional job agency/CV route. Shotgun sending out of CVs is a mug's game, and heck of a depressing.

Excellent. Great to hear that there's hope for inventive people without cookie-cutter resumes.
 

Offline Sparky49

  • Regular Contributor
  • *
  • Posts: 92
Re: Programming memes
« Reply #17 on: May 29, 2018, 07:43:09 pm »
 
The following users thanked this post: hans, T3sl4co1l

Offline helius

  • Super Contributor
  • ***
  • Posts: 3639
  • Country: us
Re: Programming memes
« Reply #18 on: May 29, 2018, 08:00:05 pm »
The Daily WTF has a large collection of terrible programming.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: Programming memes
« Reply #19 on: May 29, 2018, 08:22:33 pm »
I currently deal with things that are worse than the daily WTF. Joy to buying out a competitor.
 

Online ajb

  • Super Contributor
  • ***
  • Posts: 2598
  • Country: us
Re: Programming memes
« Reply #20 on: May 29, 2018, 08:23:49 pm »
The Daily WTF has a large collection of terrible programming.

So do most MCU vendor frameworks.
 
The following users thanked this post: kony, dcarr, Gibson486

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23018
  • Country: gb
Re: Programming memes
« Reply #21 on: May 29, 2018, 08:34:34 pm »
Hahaha yeah I’ve been fighting XC8 toolchain this week. Just went and wrote the fucking code in assembly in the end.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Programming memes
« Reply #22 on: May 29, 2018, 11:39:57 pm »
There's some terrible code there, but the good news is modern compilers are pretty good.

For example I tried the "return true if x >= y" one.

bool ge(int x, int y){
    bool v;
    if (x > y) v = true;
    if (x < y) v = false;
    if (x == y) v = true;
    return v;
}

 gcc -O2 gave (on x86_84):

   cmpl   %esi, %edi
   setge   %al
   ret

On RISC-V64:

   slt   a0,a0,a1
   xori   a0,a0,1
   ret

(this is as good as you can do, as there isn't a "slte a0,a0,a1" or "sgt a0,a1,a0". slt/slti/sltu/sltiu is all you get (unsigned and immediate variants))

On Thumb2:

   cmp   r0, r1
   ite   lt
   movlt   r0, #0
   movge   r0, #1
   bx   lr

On ARM64:

   cmp   w0, w1
   cset   w0, ge
   ret
 

Offline T3sl4co1lTopic starter

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Programming memes
« Reply #23 on: May 30, 2018, 12:04:25 am »
Oooh, as I'm working with AVR right now I'm a little curious how that would evaluate.

Specifically, with -O0 it should be awful, more or less literal.  GCC is notoriously verbose on -O0.

Should be able to produce comparable results on -Os or -O3 though.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4028
  • Country: nz
Re: Programming memes
« Reply #24 on: May 30, 2018, 04:19:24 am »
Oooh, as I'm working with AVR right now I'm a little curious how that would evaluate.

Specifically, with -O0 it should be awful, more or less literal.  GCC is notoriously verbose on -O0.

Should be able to produce comparable results on -Os or -O3 though.

I should have done AVR as I have the compiler lying around. Both -Os and -O2 produce...

    ldi r18,lo8(1)
   cp r24,r22
   cpc r25,r23
   brge .L2
   ldi r18,0
.L2:
   mov r24,r18
   ret

That's as good as you can get. Of course it's hampered by being only an 8 bit CPU, but in this case that's only one extra instruction. "cpc" is a bit of a clever instruction .. 6502 and so forth couldn't do that so easily -- they'd need to compare the high bytes first and only do the second compare if they were equal
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf