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
fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

eschaton posted:

no you don't

i guess it depends on your perspective. if i want to get another job in china after quitting this job then i need a release letter from the company, which they could decide to withhold if i dont follow my contractual obligation to give 1 month notice. if i'm leaving china forever then it doesn't matter, you're right.

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008

fart simpson posted:

i guess it depends on your perspective. if i want to get another job in china after quitting this job then i need a release letter from the company, which they could decide to withhold if i dont follow my contractual obligation to give 1 month notice. if i'm leaving china forever then it doesn't matter, you're right.

how is the work there

Bloody
Mar 3, 2013

why do my unit tests throw AppDomainUnloadedExceptions as like console output notifications with absolutely no information about where they're coming from nor really any apparent concern for their existence

Bloody
Mar 3, 2013

i have one thread other than the main test thread but the Dispose() is cleaning it up properly ???

Chalks
Sep 30, 2009

Devops tip of the day: If you accidentally erase 1.7 million files, please don't just send an email to some senior staff members then keep using the disk for 8 hours until people wake up, read the email and poo poo themselves.

Today has been fun.

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


i did a hierarchy diagram thing in d3.js as an experiment like 2 years ago and one team went "holy poo poo this is exactly what we need, we should put this in production!" 18 months later a half baked version with like 20% of the functionality gets delivered inside a lovely ext js interface. i can't wait to see what kind of clusterfuck is generating it.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Chalks posted:

Devops tip of the day: If you accidentally erase 1.7 million files, please don't just send an email to some senior staff members then keep using the disk for 8 hours until people wake up, read the email and poo poo themselves.

Today has been fun.

devops tip of the day: enable shadow volume copy.

Xarn
Jun 26, 2015
Terrible programmers I need your help for my terrible thing.

I have bunch of .cpp files with function definitions and I would like to programatically strip the function bodies, giving them some sort of default implementation (empty body for void functions, throw something for other functions). Is there an easy tool for that, or should I just go and figure out libclang?

I also have some template .hpp files that I want to do the same with.

Mao Zedong Thot
Oct 16, 2008


Xarn posted:

Terrible programmers I need your help for my terrible thing.

I have bunch of .cpp files with function definitions and I would like to programatically strip the function bodies, giving them some sort of default implementation (empty body for void functions, throw something for other functions). Is there an easy tool for that, or should I just go and figure out libclang?

I also have some template .hpp files that I want to do the same with.

very dependant on the particulars, but this is possibly way easier to do to text with sed/awk/grep than to code with something smarter

depends on the amount of files, how often you plan to do this again, if other people need to do this, how the code is formatted etc

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

LeftistMuslimObama posted:

devops tip of the day: enable shadow volume copy.
behead those who insult shadow copy

vodkat
Jun 30, 2012



cannot legally be sold as vodka
Dear terrible programmers, some the data I'm scraping with python is starting to get quite bit and csv files seem to be getting quite impractical after a gig or two. I think I need to start using some sort of proper database, but I have no idea where to start and really don't want to get into anything thats too complicated or fancy. What should I do and how should I try to make it as least terrible as possible?

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

vodkat posted:

Dear terrible programmers, some the data I'm scraping with python is starting to get quite bit and csv files seem to be getting quite impractical after a gig or two. I think I need to start using some sort of proper database, but I have no idea where to start and really don't want to get into anything thats too complicated or fancy. What should I do and how should I try to make it as least terrible as possible?

you should try sqlite and eventually set up something like postgresql imo

Uncle Enzo
Apr 28, 2008

I always wanted to be a Wizard

vodkat posted:

Dear terrible programmers, some the data I'm scraping with python is starting to get quite bit and csv files seem to be getting quite impractical after a gig or two. I think I need to start using some sort of proper database, but I have no idea where to start and really don't want to get into anything thats too complicated or fancy. What should I do and how should I try to make it as least terrible as possible?

sqlite

Arcsech
Aug 5, 2008

Symbolic Butt posted:

sqlite and eventually set up something like postgresql imo

this

only switch to postgres if you have an actual reason to though. that actual reason will probably be if you end up needing concurrent access to your db, or fancy postgres features like json columns or w/e

to be clear, sqlite is made for exactly your use case: flat files are too unwieldy, but it's not worth running a full-on db server

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Xarn posted:

Terrible programmers I need your help for my terrible thing.

I have bunch of .cpp files with function definitions and I would like to programatically strip the function bodies, giving them some sort of default implementation (empty body for void functions, throw something for other functions). Is there an easy tool for that, or should I just go and figure out libclang?

I also have some template .hpp files that I want to do the same with.

this would be under 50 lines of code with libclang and is a nice excuse to learn how to use it

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

Arcsech posted:

only switch to postgres if you have an actual reason to though. that actual reason will probably be if you end up needing concurrent access to your db, or fancy postgres features like json columns or w/e

to be clear, sqlite is made for exactly your use case: flat files are too unwieldy, but it's not worth running a full-on db server

Sqlite is slow as gently caress though. I was measuring insert and select speeds 10 times over postgres just on my POS laptop for really small amounts of data (~10000 rows with ~40 columns of varchars, IIRC).

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

ulmont posted:

Sqlite is slow as gently caress though. I was measuring insert and select speeds 10 times over postgres just on my POS laptop for really small amounts of data (~10000 rows with ~40 columns of varchars, IIRC).

don't they have completely different use cases? i normally see sqlite on phones for whatever terrible app needs a local data store and maybe as a cheapy dev environment if you don't want to run a full db on your laptop for whatever reason.

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

leper khan posted:

don't they have completely different use cases? i normally see sqlite on phones for whatever terrible app needs a local data store and maybe as a cheapy dev environment if you don't want to run a full db on your laptop for whatever reason.

The use case is the same for me (some SQL-speaking data store I can program against for my little toy projects), but I agree in general.

Bloody
Mar 3, 2013

sqlite is great whenever you dont want to deal with janitoring a db server but also want a data store better than random serialized poo poo

NihilCredo
Jun 6, 2011

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

Bloody posted:

sqlite is great

no qualifiers necessary

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

ulmont posted:

Sqlite is slow as gently caress though. I was measuring insert and select speeds 10 times over postgres just on my POS laptop for really small amounts of data (~10000 rows with ~40 columns of varchars, IIRC).

what were the absolute numbers? it's possible to make SQLite go pretty drat fast, you just have to know how it wants to be used (like any database)

obviously you're doing all those inserts in a transaction, but are you creating indexes in advance or dropping them, doing the inserts, then re-adding them? the latter will be faster. same with if you're using foreign key constraints; SQLite turns those into triggers, so add them after a huge import of known-consistent data. etc.

jesus WEP
Oct 17, 2004


got a literal fizzbuzz today in a job interview, lmao

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

St Evan Echoes posted:

got a literal fizzbuzz today in a job interview, lmao

the other day i got "print the even numbers from 1 to 100 inclusive" and that was the only white boarding question

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i break out into a cold sweat if i have to deal with inclusive vs. exclusive

usually just test it every single time to make sure i'm doing it right

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

eschaton posted:

what were the absolute numbers? it's possible to make SQLite go pretty drat fast, you just have to know how it wants to be used (like any database)

And yet, with postgres I didn't have to do anything at all to get acceptable performance on the same hardware...

eschaton posted:

obviously you're doing all those inserts in a transaction, but are you creating indexes in advance or dropping them, doing the inserts, then re-adding them?

In my case (this program just imports precinct-level election results from each county in Georgia into a table for an election year so that queries can be run later), since I have all the data to begin with and it doesn't get mutated (only queried later), I actually drop the table and recreate it before any insertions. No indexes (other than presumably the primary key, which is a combined county + precinct name key [both VARCHAR(100)]). I didn't bother adjusting any transaction levels, so I'm sure all ~3000 of my inserts were in separate transactions at isolation level Serializeable.

eschaton posted:

the latter will be faster. same with if you're using foreign key constraints; SQLite turns those into triggers, so add them after a huge import of known-consistent data. etc.

Not a single foreign key constraint at all.

jesus WEP
Oct 17, 2004


Flat Daddy posted:

the other day i got "print the even numbers from 1 to 100 inclusive" and that was the only white boarding question
i also got "reverse a string" and those were literally the only two coding questions they gave me

jokes on them, on the way to the interview room i walked through 3 identical offices each with about 100 devs typing in total silence and already decided i didnt want the job

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


what sort of job posting are you guys seeing these piss-easy interview whiteboard questions for

they seem appropriate for entry level but now i'm kinda curious

Bloody
Mar 3, 2013

i have seen them in all sorts of places. programming interviews are universally utter trash and everyone complicit in them should feel ashamed

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


i'd feel more confident going looking for a new job if i knew the interviews would be that easy, lmao

Shaman Linavi
Apr 3, 2012

St Evan Echoes posted:

i also got "reverse a string" and those were literally the only two coding questions they gave me

jokes on them, on the way to the interview room i walked through 3 identical offices each with about 100 devs typing in total silence and already decided i didnt want the job

i wish i got poo poo like that, instead i get "ok i want you design this api for a thing also i dont want you to use a database"
and my streak of "we will be moving on with others" from tech companies continues

now i just hope OPM doesnt get too backlogged and i can eventually become the federal computer toucher i always wanted to be

i think what really kills me in interviews is i am a very build and fix programmer
i rather hack something up fast and have basic functionality than worry about stupid users breaking it but that means im not very good at debugging without an initial run through

Soricidus
Oct 21, 2010
freedom-hating statist shill
I need to write a command line program to run on a linux, and ideally it should be a single small self-contained executable. what's the least bad option? I'm thinking of giving go a try even though it looks like a bad lang since people keep saying this is the niche where it is actually good?

Bloody
Mar 3, 2013

Ciaphas posted:

i'd feel more confident going looking for a new job if i knew the interviews would be that easy, lmao

thats the worst part - theyre insanely trivial but then you dont get the job some large %age of the time for ~some reason~

Bloody
Mar 3, 2013

Soricidus posted:

I need to write a command line program to run on a linux, and ideally it should be a single small self-contained executable. what's the least bad option? I'm thinking of giving go a try even though it looks like a bad lang since people keep saying this is the niche where it is actually good?

rust or haskell or c or c++

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Soricidus posted:

I need to write a command line program to run on a linux, and ideally it should be a single small self-contained executable. what's the least bad option? I'm thinking of giving go a try even though it looks like a bad lang since people keep saying this is the niche where it is actually good?

just write it in C++ like god intended

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


i used to do all my quick-and-dirty command line stuff in c/c++ depending but nowadays i'm starting to take a shine to perl

mostly because when I need these quick progs it's some sort of string manip nonsense and perl is real fukken good at that, so i just generally use it more often

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


also lately C++ has just pissed me off for various reasons, most recently name mangling related interop problems (ever try calling a C++ library from pl/sql? hahahahahaha no)

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Ciaphas posted:

what sort of job posting are you guys seeing these piss-easy interview whiteboard questions for

they seem appropriate for entry level but now i'm kinda curious

We do FizzBuzz and a couple other basic questions for Senior-level positions. I've seen several people now who have 5-10 yrs experience on their resume but still manage to be incompetent and I would never want to work with them and we'd never know with a few simple whiteboard exercises.

We also have a manager who judges candidates on whether or not they write the fizzbuzz requirements down before writing code on the board. I don't think that makes any difference at all but he believes it indicates "cowboy programmers" if you don't write the reqs down. I told him "oh for sure man"

Mao Zedong Thot
Oct 16, 2008


Soricidus posted:

I need to write a command line program to run on a linux, and ideally it should be a single small self-contained executable. what's the least bad option? I'm thinking of giving go a try even though it looks like a bad lang since people keep saying this is the niche where it is actually good?

go is good, particularly at being a self contained executable

i'm not sure if you've heard, but it doesn't have generics? it's also not as good as erlang. which rounds out pretty much all the criticism it's garnered itt

also all the awful c# and java people don't like it, which is a strong vote for imho

Luigi Thirty
Apr 30, 2006

Emergency confection port.

can't you use c# on a linux now? do that imo

Adbot
ADBOT LOVES YOU

Mao Zedong Thot
Oct 16, 2008


fizzbuzz is actually good (well not bad, at least) because at any level it never fails to filter people out

sad, but effective

  • Locked thread