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
cinci zoo sniper
Mar 15, 2013




ratbert90 posted:

I’m not trying! The mix of arrogance, incompetence, and all in all dissolution of reality are just making for some good stories.

I guess one other update I forgot to mention: The one other engineer who stayed when I left put his 2 weeks in a few days ago. So now they will have 0 programmers left who know anything about any of the code.


The way I see it: they are my contacts, I have known them for a few years now, as far as third party and foreign goes, they are quite good and are used to how I want code to look/be formatted/be organized.

It’s not a moral problem for me either. A company pays me for ${product} and I provide that. How I went about it doesn’t really matter so long as it’s legal and the quality is good yeah?

eh im not insinuating anything, just saying it’s fancy to have offshore developers as an individual

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

ratbert90 posted:

I’m not trying! The mix of arrogance, incompetence, and all in all dissolution of reality are just making for some good stories.

I guess one other update I forgot to mention: The one other engineer who stayed when I left put his 2 weeks in a few days ago. So now they will have 0 programmers left who know anything about any of the code.


The way I see it: they are my contacts, I have known them for a few years now, as far as third party and foreign goes, they are quite good and are used to how I want code to look/be formatted/be organized.

It’s not a moral problem for me either. A company pays me for ${product} and I provide that. How I went about it doesn’t really matter so long as it’s legal and the quality is good yeah?

I'm curious about this what's your setup? Do you work with them like you're in a team together, or just check their work like they're independent contractors, or organise everything like you're a pm, or what?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Krankenstyle posted:

lmao i got the code form the academic paper after literally 3 months of emailing them reminders

i forgot how bad academic code is:
- only works in one specific snowflake os configuration
- crashes randomly due to missing files
- virtually no points of customization or extension
- global variables galore
- lots of spaghetti

all in all its real shoddy code, just pure crap.

at work we hired a PhD to implement some new compression that was tailored to geospatial databases that were intended to run on fairly low powered devices where saving $0.10/unit on SD card storage was huge. So he came
on to implement it during his sabbatical from university. he implemented it, and well, and it was time for integration. Also this was C.

I start working on it, notice the method signatures are a bit strange, and dive into the code. everything was variables x1, x2, x3, y1, y2, y3, dx, dy, zzz, l1, l2, l3, i1, i2, i3. they were all declared at the top of the function. sometimes reused, sometimes they were one time use.

it was line after line after line of this. No structs of course. after a few years we realized this is how all PhD code is.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



hahahha barf --- check this poo poo out:

code:
# variables to track - see output file for interpretation
vs = [0]*35
:catstare:

cinci zoo sniper
Mar 15, 2013




Krankenstyle posted:

hahahha barf --- check this poo poo out:

code:
# variables to track - see output file for interpretation
vs = [0]*35
:catstare:

hahaha you’d need to deliberately write it this way. wonder what is the first language with this syntactical thing

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
does that make a 35 element array?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



CRIP EATIN BREAD posted:

does that make a 35 element array?

yes it does, literally the rest of the code is like vs[24] += 1

actually sorry i mean vs[24] = vs[24] + 1

cinci zoo sniper posted:

hahaha you’d need to deliberately write it this way. wonder what is the first language with this syntactical thing

i first saw that syntax this week lol so its not in basic :shrug:

gonadic io
Feb 16, 2011

>>=

CRIP EATIN BREAD posted:

does that make a 35 element array?

I bet that author is frustrated that the language doesn't have support for other variable names, but they do what they can to work around the limitation

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE
why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic io posted:

I bet that author is frustrated that the language doesn't have support for other variable names, but they do what they can to work around the limitation

guess how "vs" ends up being used:

160 lines of print-statements that are identical except for which vs value is inserted

gonadic io
Feb 16, 2011

>>=

TheFluff posted:

why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

I'm deffo a bit guilty of this, although I have used debuggers and am fine in intellij. I suspect the reason is similar to how people won't spend 5 mins fixing an issue that will eventually cost them hours. Ie setup cost, initial increase in complexity whereas each new print statement is a tiny really quick thing to do they'd rather just do that then spend 5 mins setting up a debugger or learn new stuff

mystes
May 31, 2006

Krankenstyle posted:

yes it does, literally the rest of the code is like vs[24] += 1

actually sorry i mean vs[24] = vs[24] + 1


i first saw that syntax this week lol so its not in basic :shrug:
Was this code written by a decompiler?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



mystes posted:

Was this code written by a decompiler?

no lol afaik theyre just nerds who arent programmers and they have no requirements re maintenance or support or readability. like their reqs are just "did it work when we tried" and it did work for them, i think, probably

DrPossum
May 15, 2004

i am not a surgeon

gonadic io posted:

logstash has an issue where if you start it in a fresh docker container it can't start until it gathers enough entropy or some bullshit in practice this means a 15 min startup time

this has been happening for months and have i lifted a finger to fix it and save time? like gently caress, i like being all "pushed the button now time to stretch my legs"

Have it gather entropy by reading ur poasts

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
often the things i need to debug involve them happening a whole bunch of times, but is only going wrong one of those times. so if you wanted to use a debugger, you'd either have to come up with a conditional breakpoint expression that only triggered in the failure case (and if you knew enough about the problem to be able to write that, you probably don't need to step through it in a debugger - often the problem only becomes apparent well after the point you want to start investigating values), or work through all the non-failing cases first before you get to the interesting one.

so it's easier to add a bunch of logging, reproduce the issue, then read the entrails to divine what went wrong

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



debug logging is fine

logging in itself is fine, the more the better imo

Xarn
Jun 26, 2015

Jabor posted:

often the things i need to debug involve them happening a whole bunch of times, but is only going wrong one of those times. so if you wanted to use a debugger, you'd either have to come up with a conditional breakpoint expression that only triggered in the failure case (and if you knew enough about the problem to be able to write that, you probably don't need to step through it in a debugger - often the problem only becomes apparent well after the point you want to start investigating values), or work through all the non-failing cases first before you get to the interesting one.

so it's easier to add a bunch of logging, reproduce the issue, then read the entrails to divine what went wrong

Time Travel debugging. Just capture a trace of failed case and then replay it until you figure it out.

DrPossum
May 15, 2004

i am not a surgeon
hi everyone I've solved all our problems

code:
#!/usr/bin/python
  
import random, sys

message = ["just post", "yospos btch", "mylp", "shaggar was right", "don't quote stymie"]

justpost = True

while justpost:
    randmess = random.choice(message)
    sys.stdout.write( "".join(list(map( \
            lambda x: x.upper() if random.choice([True, False]) \
            else x.lower(), list(randmess) ))) + " ")

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



somewhere in the previous thread i wrote up a shaggarscript parser

"java good python bad" is i thnk +1

FlapYoJacks
Feb 12, 2009

gonadic io posted:

I'm curious about this what's your setup? Do you work with them like you're in a team together, or just check their work like they're independent contractors, or organise everything like you're a pm, or what?

I’m the PM/QA guy. I treat them like a black box and it works extremely well. I ask them to make widget A, and they make widget A, hand me the code after it passes CI, I will then review it and make sure it looks clean, then I will commit it to my branch on the clients git server of choice and do a merge request.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



here we go:

Python code:
import sys, re

DEBUG = False

data = None

if len(sys.argv) > 2:
	data = sys.argv[1:]
elif len(sys.argv) > 1:
	f = open(sys.argv[1])
	data = f.read().split()
else:
	print 'usage: shaggarscript.py [tokens | file]'
	exit()

register = 0
stack = []

def pop():
	if DEBUG: sys.stderr.write('pop\n')
	global register
	register = stack.pop()

def push():
	if DEBUG: sys.stderr.write('push\n')
	global register
	stack.append(register)

def inc():
	if DEBUG: sys.stderr.write('inc\n')
	global register
	register += 1

def dec():
	if DEBUG: sys.stderr.write('dec\n')
	global register
	register -= 1

def add():
	if DEBUG: sys.stderr.write('add\n')
	global register
	register += stack[-1]

def sub():
	if DEBUG: sys.stderr.write('sub\n')
	global register
	register -= stack[-1]

def out():
	if DEBUG: sys.stderr.write('out\n')
	sys.stdout.write(chr(register))

instruction_map = {
	'python': pop,
	'java': push,
	'good': inc,
	'bad': dec,
	'lol': add,
	'idiot': sub,
	'language': out
}

for token in data:
	token = re.sub(r'\W+', '', token)
	if DEBUG: sys.stderr.write('%s %s %s\n' % (stack, register, token))
	if instruction_map.has_key(token):
		instruction_map[token]()
		if DEBUG: sys.stderr.write('=> %s %s\n' % (stack, register))
	else:
		if DEBUG: sys.stderr.write('nop\n')
	if DEBUG: sys.stderr.write('---\n')
python shaggarscript.py java good java lol java lol java lol java lol java lol java lol java is good. few languages are good good good good good good good good good good. java is a good language. unlike python, its a really good good good good language. not a bad bad bad language. python is so bad bad bad bad bad bad bad bad. really bad bad bad bad bad bad... few things are as bad. so, so bad bad bad bad bad bad bad. bad bad bad bad bad bad bad bad. a bad language. python? python is poo poo. python is not good. not a good language.

Uncle Enzo
Apr 28, 2008

I always wanted to be a Wizard
turing test passed


the future of ai is now

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



:hai: double future java lol bad

mystes
May 31, 2006

Krankenstyle posted:

ood java lol java lol java lol java lol java lol java lol java is good. few languages are good good good good good good good good good good. java is a good language. unlike python, its a really good good good good language. not a bad bad bad language. python is so bad bad bad bad bad bad bad bad. really bad bad bad bad bad bad... few things are as bad. so, so bad bad bad bad bad bad bad. bad bad bad bad bad bad bad bad. a bad language. python? python is poo poo. python is not good. not a good language.
Trump must speak some sort of turing machine language as well.

Main Paineframe
Oct 27, 2010

TheFluff posted:

why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

in my experience, a lot of people just haven't ever learned to use one. and once people start actually coding, they think they're too busy (trying to fix their broken code) to set aside some time to learn how to use helpful tools

programming classes and programming courses and programming books will all teach someone how to sling lovely code, but I've never seen one even mention debuggers. debugging with log statements or whatever is simple enough that most people can come up with the idea on their own the first time they ever have to debug something, but in order to realize the power of the debugger you need to either look it up or exercise some basic intellectual curiosity

DrPossum
May 15, 2004

i am not a surgeon
A friend of mine took a cool course at Carnegie Mellon when he was an undergrad that was described to me as a prof would give you some binary each week and your job was to hunt down problems or fix things in gdb.

For new students I work with on programming projects, I tell them I don't give a poo poo if they don't have any presentable work done for any amount of time as long as they spent that time learning a debugger. This has paid off many, many times over

cinci zoo sniper
Mar 15, 2013




i debug with print statements until they don’t help because of setup cost and complicated internals of library objects i usually have to debug. also most of my code moves physically big datasets so debugging inches considerably perf penalties, leading to print debugging being actually faster

Main Paineframe
Oct 27, 2010
when I get roped into helping people debug something, I teach them to use the debugger first thing, because gently caress you if you think I'm going to puzzle out what your loving pile of lovely javascript does without it. if they want my help, they're gonna have to press f12, because I'm not going to figure anything out by looking over their shoulder at the single function that's misbehaving

Shaggar
Apr 26, 2006

TheFluff posted:

why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

people used to bad tools don't know whats available in good tools

Star War Sex Parrot
Oct 2, 2003

mystes posted:

I think a decade ago there was some sort of software created as part of academic research somewhere that looked really cool that I kept hoping they would release, but after saying they would release it eventually for several *years* the people who made it just gave up and said they had decided that it was impossible (despite the software apparently functioning fine on their systems).

I think one of the problems was that it was written in smalltalk or something so they inevitably rewrote a lot of built in functionality until their software was incompatible with a normal environment (for some reason it seems like smalltalk or smalltalk derivatives like squeak not only allow but actually encourage this?).
this is like... all academic research projects. most of the academic projects I tinker with this semester (BESS, zsim) require very specific OS versions, package dependencies, etc. and will never be updated

if you're lucky you can get a patch from the author that for some reason they don't just distribute, but it's annoying having to juggle 10 VMs on my laptop for various research software.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
imo effective logging and metrics are almost more important than being able to use a debugger if you’re working with distributed systems.

Star War Sex Parrot
Oct 2, 2003

Main Paineframe posted:

programming classes and programming courses and programming books will all teach someone how to sling lovely code, but I've never seen one even mention debuggers.

DrPossum posted:

A friend of mine took a cool course at Carnegie Mellon when he was an undergrad that was described to me as a prof would give you some binary each week and your job was to hunt down problems or fix things in gdb.
yeah it's a neat class

the course and its textbook have been adopted at quite a few universities (USC, UVA, etc.) now

Star War Sex Parrot
Oct 2, 2003

also interactive debuggers are great. I first learned their usefulness with JTAG debuggers (good luck doing debug printing/logging on an embedded device with like no memory and no communication ability) and now find CLion's built-in support for GDB and LLDB very useful when debugging stuff

Arcsech
Aug 5, 2008

uncurable mlady posted:

imo effective logging and metrics are almost more important than being able to use a debugger if you’re working with distributed systems.

this is very true

putting in effective logging ahead of time will save you many, many hours of pounding at the problem with your debugger if your system has more than one process

that said, the debugger is still a great way to gently caress with the state/force pauses in one node to trigger a failure in another sometimes

and ofc if you can boil your problem down to something you can reproduce in a single node then debuggers are great

DrPossum
May 15, 2004

i am not a surgeon

uncurable mlady posted:

imo effective logging and metrics are almost more important than being able to use a debugger if you’re working with distributed systems.

:hai:

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
that said 'effective logging and metrics' is also a skill that isn't taught very well

AggressivelyStupid
Jan 9, 2012

I loved intellijs ability to run arbitrary snippets when I was paused on a breakpoint but I've not gotten much fancier than that and now I'm working with visual studio and I have no idea what's going

akadajet
Sep 14, 2003

uncurable mlady posted:

that said 'effective logging and metrics' is also a skill that isn't taught very well

software engineering is a skill that isn't taught very well

fritz
Jul 26, 2003

Star War Sex Parrot posted:

this is like... all academic research projects. most of the academic projects I tinker with this semester (BESS, zsim) require very specific OS versions, package dependencies, etc. and will never be updated

if you're lucky you can get a patch from the author that for some reason they don't just distribute, but it's annoying having to juggle 10 VMs on my laptop for various research software.

i wasnt able to find it last time i went looking but there was an academic meta-project a few years ago where they collected a big pile of academic software packages and rated them by 'can our grad student figure out how to compile, install, and use in 30 minutes, and if so does the software actually function'

Adbot
ADBOT LOVES YOU

Star War Sex Parrot
Oct 2, 2003

fritz posted:

i wasnt able to find it last time i went looking but there was an academic meta-project a few years ago where they collected a big pile of academic software packages and rated them by 'can our grad student figure out how to compile, install, and use in 30 minutes, and if so does the software actually function'
I'm trying to be a good citizen and stay current on our project. we have a single script to bring in package dependencies on supported OSes (recent macos versions and ubuntu LTS). I'm working on GCC 8-related fixes (we use 7 right now and will likely keep that as the default since that's what 18.04 LTS uses). next week I'll tackle LLVM 7 stuff since we use 6 currently

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