New around here? Register your SA Forums Account here!

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 $10! We charge money because it costs us money per month for bills alone, and since we don't believe in shady internet advertising, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Brain Candy
May 18, 2006

Powerful Two-Hander posted:

then every so often I go and read my own docs and am like "Heh that is pretty cool :3:"

as a profession we've built feedback into our processes

compilers tell us almost immediately if we've made syntax errors or type errors
test tell us if our program works at all
code reviews tell us if our peers can read what we wrote

(and plangs and poo poo jobs are the places that don't have these things)

but no one will read your documentation so it's a fundamentally hard and lonely thing to do

Adbot
ADBOT LOVES YOU

Brain Candy
May 18, 2006

to clarify, even if they can read it they probably won't have the time and energy to give it the thought necessary to evaluate it beyond did this grammar

for commits at least what i'm trying to do is make a story for why i did what i did, and it might be a summary for several days worth of work. i can't really evaluate it because i have all the context that went into it hot & fresh in memory. if i did it well, i'll have enough information that i can reload that context later

but i can't really know until later

ofc there are indications but no dopamine wired response to a green orb

Aramoro
Jun 1, 2012




mystes posted:

Using VBA? Why would someone do this in Excel?

In my first job we did a lot of VBA stuff but one of our customers was a charity, their computers were ancient and not all the shops had Internet, this would have been 2003/4. But they did all have Excel. So we did a management system for them to track thier clients, the central system would produce Excel spreadsheets with embedded macros in them for the current period, they'd post them out to the offices in floppies. Every month they'd post them back in and they'd load them all back into the central system.

It worked surprisingly well.

gonadic io
Feb 16, 2011

>>=
that was how i first learned to program, i was doing poo poo in excel and then got frustrated by its limitations (for example the nested formula limit that I think is gone) and started migrating the more complex stuff into vba procs, then using them from excel.

it's a slippery slope!

Soricidus
Oct 20, 2010
freedom-hating statist shill

Brain Candy posted:

as a profession we've built feedback into our processes

compilers tell us almost immediately if we've made syntax errors or type errors
test tell us if our program works at all
code reviews tell us if our peers can read what we wrote

(and plangs and poo poo jobs are the places that don't have these things)

but no one will read your documentation so it's a fundamentally hard and lonely thing to do

there is one huge exception to this rule which is apis. please document your loving apis.

no, the unit tests you wrote to verify that your implementation of the api is correct do not count as documentation.

no, your vague explanations of some specific use case on some random mailing list three years ago do not count as documentation.

no, a wiki page with “coming soon!” does not count as documentation.

no, the output of your language’s automatic api documentation tool does not count as documentation, if you have not in fact written any documentation so it’s just a plain list of functions and parameter types.

write some goddamn documentation if you want people who do not work in the same room as you to use your poo poo without cursing your name and your offspring even unto the seventh generation.

Xarn
Jun 26, 2015

Powerful Two-Hander posted:



then every so often I go and read my own docs and am like "Heh that is pretty cool :3:"

sup buddy, the feeling of "thanks me a year ago for {writing docs, using strong types, making the right extension point}" is great

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Schadenboner posted:

Could do "you" as a semi-vocalized contraction? "Y'make"?

this is what I had in my head but failed to get on the page

call it a poorly documented couplet

PierreTheMime
Dec 9, 2004

Hero of hormagaunts everywhere!
Buglord

Soricidus posted:

there is one huge exception to this rule which is apis. please document your loving apis.

no, the unit tests you wrote to verify that your implementation of the api is correct do not count as documentation.

no, your vague explanations of some specific use case on some random mailing list three years ago do not count as documentation.

no, a wiki page with “coming soon!” does not count as documentation.

no, the output of your language’s automatic api documentation tool does not count as documentation, if you have not in fact written any documentation so it’s just a plain list of functions and parameter types.

write some goddamn documentation if you want people who do not work in the same room as you to use your poo poo without cursing your name and your offspring even unto the seventh generation.

a number of teams I deal with suffer from this. I also have to endure teams who only do documentation on a Splunk site where api examples are randomly incorrect, so you have wait days until their team comes back with “oh yeah we removed the need to enclose that in quotes recently whoops” and then not update the page

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
apis must be documented.

DrPossum
May 15, 2004

i am not a surgeon

Soricidus posted:

there is a fundamental law of software that states that the only documentation that ever turns out to be important is the documentation that didn't get written

write docs? congratulations on wasting time, idiot.
didn't write docs? now everything is on fire and it's your fault, idiot.

the moral of the story is that programming was a mistake

Working examples covering your obvious cases are a) often the most useful documentation b) used (but I guess not read so much as copy pasted)

DrPossum
May 15, 2004

i am not a surgeon
just post your poo poo to stackexchange nbd

Sapozhnik
Jan 2, 2005

Nap Ghost
gently caress every tool that is configured using a source controlled dotfile

I blame .gitignore for starting this trend

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Sapozhnik posted:

gently caress every tool that is configured using a source controlled dotfile

I blame .gitignore for starting this trend

why's that? some things shouldn't be source controlled and are (i hate finding .idea checked into a project) but things like .gitignore seem fine to me.

Brain Candy
May 18, 2006

Sapozhnik posted:

gently caress every tool that is configured using a source controlled dotfile

I blame .gitignore for starting this trend

checking your CI configuration into source control owns actually

cinci zoo sniper
Mar 14, 2013




DONT THREAD ON ME posted:

why's that? some things shouldn't be source controlled and are (i hate finding .idea checked into a project) but things like .gitignore seem fine to me.

it's me, 85th commit "Removes ancillary IDE files"

cinci zoo sniper
Mar 14, 2013




speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"

post hole digger
Mar 21, 2011

cinci zoo sniper posted:

speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"

2 imo

gonadic io
Feb 16, 2011

>>=

cinci zoo sniper posted:

it's me, 85th commit "Removes ancillary IDE files"

required dev computer setup should include a ~/.gitignore_global

DrPossum
May 15, 2004

i am not a surgeon

Nude
Nov 16, 2014

I have no idea what I'm doing.

Soricidus posted:


there is one huge exception to this rule which is apis. please document your loving apis.

no, the unit tests you wrote to verify that your implementation of the api is correct do not count as documentation.

no, your vague explanations of some specific use case on some random mailing list three years ago do not count as documentation.

no, a wiki page with “coming soon!” does not count as documentation.

no, the output of your language’s automatic api documentation tool does not count as documentation, if you have not in fact written any documentation so it’s just a plain list of functions and parameter types.

write some goddamn documentation if you want people who do not work in the same room as you to use your poo poo without cursing your name and your offspring even unto the seventh generation.


Ugh, too many times I've stumbled upon paragraphs of "goal and design" of the api, and no actual coding examples.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

cinci zoo sniper posted:

speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"

3 is the most common in style guides

mod saas
May 4, 2004

Grimey Drawer
3/imperative feels the most natural to me when reading through anything

With 1/past tense, we already know it happened in the past, time is linear

2/Present tense also reads weird because it's not constantly happening, it happened at a specific point in time


Using the imperative also asserts dominance over the computer, therefore delaying a skynet scenario

raminasi
Jan 25, 2005

a last drink with no ice

mod saas posted:

3/imperative feels the most natural to me when reading through anything

With 1/past tense, we already know it happened in the past, time is linear

2/Present tense also reads weird because it's not constantly happening, it happened at a specific point in time


Using the imperative also asserts dominance over the computer, therefore delaying a skynet scenario

yeah this. 3 feels weirdest to write but reads way better imo and commit messages are read more often than they're written.

Ellie Crabcakes
Jan 31, 2008

Stop emailing my boyfriend Gay Crungus

cinci zoo sniper posted:

speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"
4) brief description, ISSUE-42069

gonadic io
Feb 16, 2011

>>=

Fatty Crabcakes posted:

5) "minor refactor, fix bugs"

gonadic io
Feb 16, 2011

>>=
one of my hobby projects has "commit whatever" as a prominently displayed commit message and when i started my first computer toucher job i got pulled aside to check that i knew that that wouldn't be acceptable in a workplace env lol

Xarn
Jun 26, 2015

cinci zoo sniper posted:

speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"

I do basically 2: applying this commit will "fix the ID10-T error in frontend"

Corla Plankun
May 8, 2007

improve the lives of everyone

vodkat posted:

Think I've got to the bottom of this, it wasn't this code that was the issue but the way in which I was applying the function using groupby, which due to a duplicate index or something (which I didn't bother trying to figuring out) it was sometimes passing more than one row to this function. I think I've fixed this by stopping trying to be clever with groupby and apply and using the much slower df.iterrows() instead.

my first guess was that you were `apply`ing and not specifying the axis so pandas was getting confused about if you wanted to apply to the dataframe or the row or what

sorry for not posting it but i was really drunk at the time and just assumed i was wrnog

gonadic io
Feb 16, 2011

>>=
urgh embedded programming is so bad, thousands of unspoken assumptions that crash your program if you so much as blink at them wrong. how does anybody get anything done like this

FlapYoJacks
Feb 12, 2009

DOES NOT OWN EXOTIC FISH

gonadic io posted:

urgh embedded programming is so bad, thousands of unspoken assumptions that crash your program if you so much as blink at them wrong. how does anybody get anything done like this

By using embedded Linux instead OP.

gonadic io
Feb 16, 2011

>>=

ratbert90 posted:

By using embedded Linux instead OP.

you've honestly convinced me. i was only using a samd mini for a nice and small form factor but i should be deving on my pi. i wonder what it's like using the rpi serial ports from rust? probably fine honestly and sure as gently caress better than i'm doing now

FlapYoJacks
Feb 12, 2009

DOES NOT OWN EXOTIC FISH

gonadic io posted:

you've honestly convinced me. i was only using a samd mini for a nice and small form factor but i should be deving on my pi. i wonder what it's like using the rpi serial ports from rust? probably fine honestly and sure as gently caress better than i'm doing now

Yeah, with things like the OrangePI being so cheap and small, there’s really very little reason to go full embedded these days.

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


ratbert90 posted:

Yeah, with things like the OrangePI being so cheap and small, there’s really very little reason to go full embedded these days.

and yet you see it all the time in a lot of places

usually because its how a particular shop has always been run

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

cinci zoo sniper posted:

speaking of commit messages, i still have no idea if they should be

1) i, developer, "fixed the bug"
2) applying this commit "fixes the bug"
3) commit, "fix the bug"

a functioning human being can understand all three equally well as they mean the same thing and as a result does not care in the slightest

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


Boiled Water posted:

and yet you see it all the time in a lot of places

usually because its how a particular shop has always been run

both have their place, if you need a tight loop with lots of DMA use and rapid timing and digital/analog work going full embedded works better

Linux is mainly good when you need to do complex logic, work with graphics, run a server or do other stuff that needs libraries for a reasonable implementation

the device I (soon-to-be-used-to) work on has 3 different complexity levels of embedded socs/mcus in it, with embedded Linux at the top

e:
one example where a low-level mcu is absolutely necessary is analysing NDIR signal, or waveforming ultrasound; or really anywhere where you regularly need sub-microsecond precision. also its cheaper (it's like $0.50 per piece for a typical STM32F0) than a full Linux soc, which matters if you are not doing hobbyist things. oh and uses up orders of magnitude less power

Private Speech fucked around with this message at 00:12 on Feb 18, 2019

DaTroof
Nov 16, 2000

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

NihilCredo posted:

a functioning human being can understand all three equally well as they mean the same thing and as a result does not care in the slightest

most attempts to apply grammatical rules to commit messages are intended to stop dipshits from submitting "asdf" and those people are already unhelpable

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
back in the early 90s i worked in a recording studio where a guy insisted on labeling his disks "dope poo poo" and "dope poo poo 2" and "dope poo poo 3" and i couldn't convince him why it was a terrible idea until he realized it on his own the hard way several months later

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
yeah, i wanna go back to that one dope beat we recorded last february...uh...help me out here...i think it was somewhere between dope poo poo 4 and dope poo poo 76

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
bisect still would’ve worked ok

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

hrmm

i have a list of dicts where a certain key contains a list. i want a merged list of all those lists, but my list comprehension comprehension is lacking... halp?

code:
>>> columns = [{'a': [1,2,3]}, {'a': [4,5,6]}]
>>> [c['a'] for c in columns]
[[1, 2, 3], [4, 5, 6]]
>>> [t for t in c['a'] for c in columns]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'c' is not defined
e: doy

code:
>>> [t for c in columns for t in c['a']]
[1, 2, 3, 4, 5, 6]

Carthag Tuek fucked around with this message at 13:05 on Feb 18, 2019

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