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.
 
  • Locked thread
AWWNAW
Dec 30, 2008

raminasi posted:

you sound like a pleasure to work with

actually,

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

LOOK I AM A TURTLE posted:

i guess youre referring to TransactionScope? its basically a way to use the same transaction in different methods, classes or even assemblies without having to explicitly pass around a transaction object or do manual commit/rollback. when you do using (var scope = new TransactionScope()) you either create a new transaction or enlist in the existing one if someone already created a scope above you in the stack. when you've finished doing your databasey thing you call scope.Complete() and dispose the scope object. If there are no remaining open scopes the transaction gets committed, if theres at least one scope that hasnt voted to commit yet, nothing happens for the time being. if a scope closes without having voted to commit (or if an exception is thrown inside the scope) the transaction is automatically rolled back.

it does make it less obvious what transaction each operation is part of, but the nice thing is you can have a method that works both standalone and as part of a larger transactional operation without resorting to flag parameters that tell the method whether it should commit when successful. code with TransactionScope is pretty easy to read and understand in my experience. there are probably some drawbacks to it but im not really aware of them.

so it's basically a re-entrant lock?

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
oh, my code only got a +1 in the review, what did i gently caress up?

"your imports are in the wrong order, see this page in the wiki."

he was right, there was a page in the wiki. that he had made. under "local environment setup" not "code style" and there was no announcement or discussion of the change in the developer channel.

loving fine, i can change the settings in my ide, just not like this.

also "it looks like you're not using this some.package.SomeThing import anywhere"

"check lines 95...110, method setupSomeThing() :geno:" (i loving run "optimize imports" on commit, goddammit)

Bloody
Mar 3, 2013

goto-style error handling is an interesting idiom

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Wheany posted:

oh, my code only got a +1 in the review, what did i gently caress up?

"your imports are in the wrong order, see this page in the wiki."

he was right, there was a page in the wiki. that he had made. under "local environment setup" not "code style" and there was no announcement or discussion of the change in the developer channel.

loving fine, i can change the settings in my ide, just not like this.

condolences for working with a petty coding standard vigilante

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Strumpy posted:

condolences for working with a petty coding standard vigilante

it's fine, as long as i am made aware of the standards and i can discuss them earlier than in code review.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Wheany posted:

he was right, there was a page in the wiki. that he had made.

:eyepop:

i guess someone was bound to make the wiki eventually but it's still a shock when it happens

stramit
Dec 9, 2004
Ask me about making games instead of gains.

Soricidus posted:

:eyepop:

i guess someone was bound to make the wiki eventually but it's still a shock when it happens

Our wiki has 3 different coding standards. Most people just roll a dice and go with whatever.

Brain Candy
May 18, 2006

Wheany posted:

it's fine, as long as i am made aware of the standards and i can discuss them earlier than in code review.

get thee a linter

make a pre-commit hook wired up to that linter that rejects commits that don't pass and you'll get rid of vast majority of this

don't waste your code review energy arguing about tabs

Luigi Thirty
Apr 30, 2006

Emergency confection port.

someone got a lecture in our slack for using "fixing" in their commit summary and WASTING SPACE WITH USELESS TEXT goddammit

Corla Plankun
May 8, 2007

improve the lives of everyone
every once in a while here someone presents about how to make nice linear git history "stories" and I am so glad i dont work with any of those people

Corla Plankun
May 8, 2007

improve the lives of everyone
"lets browse git history that is older than HEAD~4"

-no one, ever.

Brain Candy
May 18, 2006

Corla Plankun posted:

"lets browse git history that is older than HEAD~4"

-no one, ever.

randomly browse? no

but run blame, oh yes

fritz
Jul 26, 2003

Brain Candy posted:

randomly browse? no

but run blame, oh yes

also bisect

Notorious b.s.d.
Jan 25, 2003

by Reene

Sagacity posted:

At some point atlassian decided to remove the wiki markup editor from confluence and forced you to use the HTML editor because it was perfectly needs suiting, according to them.

To me it felt like trying to wrestle with a broken scrub tier mid 90s era word clone.

I checked again recently, there's now a markup editing mode again.

Edit: guess they backpedaled

so they did not backpedal one bit

they changed the internal storage format from markup-as-text-blob to xml tag-soup-as-text-blob. markup goes in, but xml tag soup comes out. you can still POST markup to confluence but you can'd edit any pages, so all markup producing/consuming tools are broken

additionally, the xml soup is not meaningfully human-readable and doesn't preserve whitespace

so basically there's no way to use confluence except through the web interface

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

fritz posted:

also bisect

bisect doesn't require "linear stories" tho, just the occasional commit that actually compiles.

Notorious b.s.d.
Jan 25, 2003

by Reene

Corla Plankun posted:

every once in a while here someone presents about how to make nice linear git history "stories" and I am so glad i dont work with any of those people

Corla Plankun posted:

"lets browse git history that is older than HEAD~4"

-no one, ever.

in theory, a sanitary git history is useful for chasing bugs with 'git bisect'

in reality, nobody uses git bisect

Xarn
Jun 26, 2015

Notorious b.s.d. posted:

in theory, a sanitary git history is useful for chasing bugs with 'git bisect'

in reality, nobody uses git bisect

Them be fighting words.

Although to be fair, I haven't used it either. My job used TFS over slow-rear end connection and emulating bisect when chasing old bug made me want to kill myself.

raminasi
Jan 25, 2005

a last drink with no ice
one time i successfully used git bisect to locate the source of a regression bug ama

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I use git bisect maybe twice a year, and it's totally worth the "pain" of not being a gaping rear end in a top hat with your commits

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

in theory, a sanitary git history is useful for chasing bugs with 'git bisect'

in reality, nobody uses git bisect

i've used bisection a whole bunch. it's really good and just one of many reasons why anyone who merges poo poo that doesn't compile into master should be shot.

fritz
Jul 26, 2003

Notorious b.s.d. posted:

in theory, a sanitary git history is useful for chasing bugs with 'git bisect'

in reality, nobody uses git bisect

i used git bisect just this last week

Bloody
Mar 3, 2013

matrices are cool. i just refactored my garbage-nn project and because it didnt immediately crash due to a matrix dimension mismatch im pretty sure everything came through fine without having to wait a few minutes to see if the results still make sense

its like type systems but for numbers

although what was expected to be a few minutes turned out to be a few seconds, lol 25x speedup, thanks matrix math

i should figure out how to get the math.net cuda bindings to work

VikingofRock
Aug 24, 2008




I've only used bisect once, but it lead me directly to a really really subtle bug in what I thought was a minor change that I had written a month ago, so it was totally worth it. I try to never commit things which don't compile so that I can bisect better now.

GameCube
Nov 21, 2006

interactive rebasing is super cool, what are you dorks complaining about

Progressive JPEG
Feb 19, 2003

Wheany posted:

oh, my code only got a +1 in the review, what did i gently caress up?

"your imports are in the wrong order, see this page in the wiki."

he was right, there was a page in the wiki. that he had made. under "local environment setup" not "code style" and there was no announcement or discussion of the change in the developer channel.

loving fine, i can change the settings in my ide, just not like this.

also "it looks like you're not using this some.package.SomeThing import anywhere"

"check lines 95...110, method setupSomeThing() :geno:" (i loving run "optimize imports" on commit, goddammit)

Good thing to know their priorities are in the right place

jony neuemonic
Nov 13, 2009

i try to get my team to janitor their feature branch history at least a little because left to their own devices they merge 25 commits that just say "wip" and then one last one that says "works now" every time they do a ticket.

Bloody
Mar 3, 2013

i got the cuda bindings built and working but they're slower than whatever the default native provider was (openblas?)

Progressive JPEG
Feb 19, 2003

I treat commit messages as justification for the change, eg what does the change fix or improve

Changes introduce risk, justify the risk

Corla Plankun
May 8, 2007

improve the lives of everyone

jony neuemonic posted:

i try to get my team to janitor their feature branch history at least a little because left to their own devices they merge 25 commits that just say "wip" and then one last one that says "works now" every time they do a ticket.

i do this and clean it up to bullet points before i push the branch, but sometimes I have to merge in another branch mid-way and that breaks git reset so I have to push my poop to origin and feel bad

comedyblissoption
Mar 15, 2006

jony neuemonic posted:

i try to get my team to janitor their feature branch history at least a little because left to their own devices they merge 25 commits that just say "wip" and then one last one that says "works now" every time they do a ticket.
according to this thread you are a commit nazi and must be insufferable to work with

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
but seriously good for you, like most things that poo poo programmers overlook it seems useless until it's suddenly super important why didn't anybody tell me this would happen guys

fritz
Jul 26, 2003

Bloody posted:

i got the cuda bindings built and working but they're slower than whatever the default native provider was (openblas?)

how big's your data b/c you might be getting hit by data transfer overhead or something

Bloody
Mar 3, 2013

fritz posted:

how big's your data b/c you might be getting hit by data transfer overhead or something

its not super big and im relying on like a beta cuda provider to not pointlessly sling poo poo back and forth to the gpu for like no reason at all

Bloody
Mar 3, 2013

anyway my garbage neural network is down to around 2 seconds per training generation (from a minute recently and several minutes longer ago) and eventually gets up to around 94.9% classification rate on the mnist handwriting set which is p deece

VikingofRock
Aug 24, 2008




Bloody posted:

anyway my garbage neural network is down to around 2 seconds per training generation (from a minute recently and several minutes longer ago) and eventually gets up to around 94.9% classification rate on the mnist handwriting set which is p deece

This sounds really cool. Would you recommend http://neuralnetworksanddeeplearning.com? It seems like you are enjoying it, and I've been meaning to brush up on my ML skills.

Bloody
Mar 3, 2013

VikingofRock posted:

This sounds really cool. Would you recommend http://neuralnetworksanddeeplearning.com? It seems like you are enjoying it, and I've been meaning to brush up on my ML skills.

yep thats the exact book. i took the python code and rewrote it in c# and i've been mucking around with it loads to learn-by-messing around with

VikingofRock
Aug 24, 2008




Yeah you had mentioned that you were using that book upthread. I'll check it out!

Bloody
Mar 3, 2013

oh ya lol yeah id recommend it. it does things in a very mathsy sort of way which isnt my favorite but there's code provided and lots of words and im definitely learning

Adbot
ADBOT LOVES YOU

Nippashish
Nov 2, 2005

Let me see you dance!
neuralnetworksanddeeplearning is a good book full of good stuff but i don't really like how it explains backprop. imo the right way to explain backprop is to draw lots of boxes with activations going forward and gradients going backward like in these slides http://www.cs.nyu.edu/~yann/2005s-V22-0480-006/diglib/lecture04a-backprop.pdf



red is the computation graph of your neural network and green is gradients from backprop. drawing it like this isn't just a nice way to visualize it but it the backprop algorithm actually breaks apart into boxes just like in this picture so you can write a bit of code for each box and you can plug them together in whatever fancy graph structure you want and if you build the boxes right you get gradients of the full graph for free.

this structure is pretty well known, but the only place i know of where someone has bothered to write it down this way is in really old yann lecun slides. if you poke around the slides for yanns old classes you can find lots of cool stuff like this http://www.cs.nyu.edu/~yann/2005s-V22-0480-006/schedule.html

torch7 is built using this idea and its worth looking at how their modules are built if you want a concrete example of how to make boxes that fit together in a generic way.

  • Locked thread