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 $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
raminasi
Jan 25, 2005

a last drink with no ice

Phobeste posted:

it's really cool that for some reason when otherwise reasonable programmers get into that FP Good poo poo they suddenly forget all about the concept of "reasonable function or variable names" or "comments" and nobody's expected to blnk an eye

i was trying to read the f# compiler source today because i was curious about something and idk if compiler code is always terrible or i’m really just that much dumber than don syme but oh lordy it was utterly incomprehensible

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice

bob dobbs is dead posted:

etl as the word was most popular in the mid to late 90's

etl the activity is getting to its zenith of popularity now

apparently etl means something other that slurping up data from somewhere, fiddling with it, and putting it in a database but i can’t for the life of me figure out how it’s different

raminasi
Jan 25, 2005

a last drink with no ice

MALE SHOEGAZE posted:

this is also a not so subtle humblebrag about me keeping up with mit students.

i hate to pop your balloon here but mit students are just a normal bell curve pushed a little bit to the right maybe, not some cabal of super geniuses

raminasi
Jan 25, 2005

a last drink with no ice

MALE SHOEGAZE posted:

oh another like, super duper important thing: learning to write unit testable code. this is maybe the most important skill to have for your average CRUD app developer. it's a huge topic that i certainly cannot do justice but the takeaway is: write code in a way that makes it easy to unit test. now you have tests, and also it turns out that most methods for writing unit testable code are also good practices in general.

i'm not sure of a good resource for unit testing though as i've picked all of this up on the job. perhaps someone else has a good rec.

also before i start a derail i'm not saying unit testing is the only kind of testing you should do but it's the best place to start learning how to test.

The Art Of Unit Testing is really, really good

raminasi
Jan 25, 2005

a last drink with no ice

Schadenboner posted:

How can I get myself to a place where any of what you guys are talking about makes any sense?

:(

start by googling terms you don’t understand, like I’m about to do

raminasi
Jan 25, 2005

a last drink with no ice

Bloody posted:

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

yeah it’s trivial to just run them on a timed schedule

raminasi
Jan 25, 2005

a last drink with no ice
but don’t you want to be able to see my ~~workflow~~?

raminasi
Jan 25, 2005

a last drink with no ice
FluentMigrator supports net core, it’s needs-suiting for developing against sql server on windows but that might be too many changed variables to be helpful

raminasi
Jan 25, 2005

a last drink with no ice
wait are the “vs is good” “vs is ok at best” arguments had between c#/c++ devs? that would make a lot of sense

raminasi
Jan 25, 2005

a last drink with no ice
i feel like sql proficiency is bipolar, like i feel comfortable with basic concepts like joins and indices and i can mostly read a query plan but i'm worried that if i put sql on my resume i'll walk into an interview where i'll have to use lateral joins and window functions and all kinds of other shenanigans that i have no proficiency with

raminasi
Jan 25, 2005

a last drink with no ice
ugh the project I’m working on with old grad student colleagues is about to start trying to get sold commercially and they’re dead set on running it through an obfuscator

all the algorithms are public and the implementation isn’t good enough to steal

raminasi
Jan 25, 2005

a last drink with no ice
unit tests are good because unit-testable code is usually clear code

raminasi
Jan 25, 2005

a last drink with no ice

DONT THREAD ON ME posted:

ctps: girlfriend wants to learn to program and i really hope it sticks because i think we'd be a good programming team

make sure to correct all her little style differences, significant others love that

raminasi
Jan 25, 2005

a last drink with no ice

mod saas posted:

as someone who learns by example are there demo pages or whatever that have demo code and tests for it, with explanation of how the tests were chosen and why the test runs the way it does

I understand the purpose of testing and I've done some, but I always draw blanks on what to do when I'm actually in the thick of it.

it gets poo poo in either this thread or a grey thread for reasons I don’t remember, but I liked the book “the art of unit testing.” I know it’s a book and not pure examples but I remember it being pretty example-focused.

raminasi
Jan 25, 2005

a last drink with no ice

Chalks posted:

i'd love to know the mindset that leads to hungarian notation being combined with literally not naming things at all

i think those are the default names the visual designer creates for new controls

you're supposed to, uh, rename them

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.

raminasi
Jan 25, 2005

a last drink with no ice

gonadic io posted:

i'm interviewing at a company that claims to be doing HFT ...in f#

im really curious about the company

raminasi
Jan 25, 2005

a last drink with no ice
what's the least poo poo document db. there's no common data model to normalize to because the only people capable of coming up with one think that just taking the union of every property they could ever conceivably care about constitutes data modeling. i have been fighting this fight for a year, i'm giving up. so what's the least poo poo document db.

e: wait i can just dump garbage into a sql server column, maybe that's the least bad option

raminasi fucked around with this message at 20:19 on Feb 21, 2019

raminasi
Jan 25, 2005

a last drink with no ice
problem: database is getting really full
me, a genius: i know i'll delete a shitload of records
problem: database and transaction log are getting really full

raminasi
Jan 25, 2005

a last drink with no ice

DELETE CASCADE posted:

just give it more space, space is cheap, data is expensive

apparently that is not an option because ????

raminasi
Jan 25, 2005

a last drink with no ice

Aramoro posted:

This is very deeply linked data so it's not just deleting the parent record but also all the links. We have a utility that does it. Main problem is say you execute the SQL to delete a modest 20 records. It takes 5 mins and locks the tables so renders the application unusable. This is ungood.

The schema is really really old and no one really considered that you'd want to delete things. Changing it is equally a nightmare because porting customers like this would take days potentially.

this is exactly our situation, minus the "really really old" part. it was just designed by someone with two thumbs who'd never done real schema design before (so i'm blaming my management).

i can delete 2k rows from the primary table and it balloons to like 500k total rows affected

raminasi
Jan 25, 2005

a last drink with no ice
if find yourself writing a property-based test that examines the test input in order to determine what output it should look for, you wanted to just write a specific case test

raminasi
Jan 25, 2005

a last drink with no ice

DaTroof posted:

i've never seen a problem that submodules didn't make worse

all of our projects at work have .teamcity in a submodule so that we can have consistent build settings. it's got some warts but none worse than manually janitoring the settings.

raminasi
Jan 25, 2005

a last drink with no ice

Corla Plankun posted:

how many times has this behavior made your job easier?

i literally could not function without a comprehensible history graph, especially when prototyping new stuff. like this is not too uncommon:

- ok i need to create feature X
- that's gonna require refactor A, let me do that
- hm this is really two refactors, let me split it into A and B (shuffle commits around)
- ok now let me actually do X
- hm looks like i need some more stuff in A, let me update it (shuffle commits around)
- you know the "right" way to do B is slightly more involved and will touch some other systems, let me do that too (shuffle commits around)
- gently caress gotta update some packages (shuffle commits around)
- sweet now i can finish X

if i'm not juggling my personal history, i have to open a PR with all this poo poo in one big unreviewable pile of garbage, and then either squash-merge into one big bang commit that does multiple entirely different things, or normal-merge some history that's completely useless for a blame or a bisect. or i can open multiple, separate PRs, one after the other, each which is reviewable on its own merits, as a smaller unit of work.

raminasi
Jan 25, 2005

a last drink with no ice
serious question, how do you link work items to commits if your commits don't mean anything

raminasi
Jan 25, 2005

a last drink with no ice

pokeyman posted:

you don’t do anything you mentioned in your example except what’s strictly required to do the work item

are you always doing it in exactly one commit though?

raminasi
Jan 25, 2005

a last drink with no ice
that sounds like code that academics who don't give a poo poo about code write

globals into parameterless functions and unnecessary, repeated deserialization are two specific calling cards i've seen

raminasi
Jan 25, 2005

a last drink with no ice

Soricidus posted:

i figured it out. or at least i figured out where the variable name was coming from.

i had a lambda in a static member assignment, like
code:
private static final Function<Butt, Poop> myPosting = butt -> butt.poop();
and for some reason intellij was complaining, in the class's non-static constructor, that the variable butt might not have been initialized?

the "fix" for now seems to be to rewrite it as
code:
private static final Function<Butt, Poop> myPosting;
static { myPosting = butt -> butt.poop(); }
which i could have sworn was exactly equivalent by definition, but intellij's compiler seems to be ok with whereas the alternative is an error for some reason?

lol java just mash poo poo till it compiles what could possibly go wrong

i know in c#, static initializers (the equivalent of the first thing) are subtly different from static constructors (the equivalent of the second thing) and i could see a theoretical low-effort lambda capture analysis caring about the distinction

raminasi
Jan 25, 2005

a last drink with no ice

galenanorth posted:

I don't know the latest version of JavaScript, ES6, or React or Angular as in the job description, only HTML5, CSS3, and JavaScript, but I'm applying anyway because I got invited to apply to it. What should I ask for the salary? This would be my first programming job and I might want it badly enough to say $30,000.

that compensation is possibly appropriate for an entry-level job at a rural non-profit but nowhere else

raminasi
Jan 25, 2005

a last drink with no ice

prisoner of waffles posted:

go lets you write methods for a type that can work even if the instance is null. this is definitely weird and will just seem wrong to most, but I think it's part of why they have that (incredibly dumb imo) "null of one type doesn't equal null of another type"

proto-c# did this and they changed it because it was confusing

raminasi
Jan 25, 2005

a last drink with no ice

Bloody posted:

equals behaves as expected (e.g. a != c in that example)

this is all extremely loving with my ability to property test some poo poo that uses strings a lot

fscheck has a generator that produces strings without goofball control characters if you have the luxury of not needing to actually care about them in your application code

raminasi
Jan 25, 2005

a last drink with no ice
day 12 of new job: appear to have broken Jenkins for the whole org lol

raminasi
Jan 25, 2005

a last drink with no ice

echinopsis posted:

I realise as I look back over this post before I post it (hard to believe but yes) that this is pretty basic poo poo.. I probably didn't need to ask. oh well

this is a well-known problem solving technique, you’ll get faster turnaround if you do it irl but if you can’t :justpost:

raminasi
Jan 25, 2005

a last drink with no ice
today a coworker and i found deep the bowels of our company’s codebase a thing that somehow wraps an IEnumerable and lets you modify it while you’re iterating it. we closed the source file before trying to discover how or why it exists to avoid suffering brain damage.

i also learned that we have an OperationsLegacyModule and a LegacyOperationsModule that are presumably different somehow.

raminasi
Jan 25, 2005

a last drink with no ice

Bloody posted:

why is method input validation so verbose in c#

im tired of dealing with

void foo(object bar, object baz) {
if(bar == null) {throw new argumentnullexception(nameof(bar));}
if(baz == null)...

why did they remove the [notnull] attribute

why isnt there a less annoying syntax for this

yes i could write some stupid helper extension methods but thats not the point

if you’re on c# 7 you can do
C# code:
bar = bar ?? throw new ArgumentNullException(nameof(bar));

raminasi
Jan 25, 2005

a last drink with no ice

ratbert90 posted:

What are you rambling about?

some yosposter actually did this, and I guess jbt confuses them with you

raminasi
Jan 25, 2005

a last drink with no ice
when I used to work from home I did it to make the other days more productive, not because I got good work done when I did it

now I work in an office I enjoy coming to so I don’t do it anymore

raminasi
Jan 25, 2005

a last drink with no ice

bob dobbs is dead posted:

Midwestern chief of product has been landing commits at 2am again

Hes a deec coder, it's just lol

does he have a newborn? I had some coworkers that would do that if they were up anyway

raminasi
Jan 25, 2005

a last drink with no ice

Adhemar posted:

If CreateButt is not idempotent, see thread title.

aren’t posts generally not assumed to be idempotent

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice

NihilCredo posted:

this is all broadly correct but there's a performance aspect to it as well. you don't want to be copying a 500-field struct around all the time, especially in well-factored code with lots of small functions.

I really want an excuse to use c#’s new(ish) pass-structs-by-reference features

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