Programming as a career

Message Bookmarked
Bookmark Removed
Not all messages are displayed: show all messages (903 of them)

SQL rules

brigadier pudding (DJP), Saturday, 13 July 2019 01:01 (six years ago)

I’ve been playing around a lot in R recently. I like that it’s more of a really powerful calculator than a programming language.

American Fear of Pranksterism (Ed), Saturday, 13 July 2019 01:58 (six years ago)

Regex'es are painful to work with, no doubt, but there's often not a simpler alternative to accomplish what you can do with them. Actually one thing that I don't like about SQL (despite it's being mostly awesome) is the lack of regexes.

o. nate, Saturday, 13 July 2019 02:18 (six years ago)

SQL wuz here ‘19

calstars, Saturday, 13 July 2019 02:18 (six years ago)

I’m a bad person who does SQL irregularly and rather than remember how to do a partition statement the other week, I once again wrote a query in LinqPad and had it generate a query for me

untuned mass damper (mh), Saturday, 13 July 2019 14:12 (six years ago)

It never ceases to amaze me how much “mission critical” shit is written in toy languages designed to be intentionally “dumber” than Real Computer Scientist code

― El Tomboto, Friday, July 12, 2019 2:39 PM (yesterday) bookmarkflaglink

I’ve known a few people who worked on code for fighter jet stuff and it was all, by regulation, done in Ada. I think it’s less dumb than incredibly explicit and lacking abstractions that would make fuck-ups easier

Apparently the rules have changed and the F-35 has been programmed in C++, which makes sense considering how much of a boondoggle that entire project is

untuned mass damper (mh), Saturday, 13 July 2019 14:17 (six years ago)

Yeah I heard ADA is used in aeronautics and shit because it’s really really hard to fuck up (there’s a word in programming language concepts for this, extra safe or something )

brimstead, Saturday, 13 July 2019 15:54 (six years ago)

seeing some dumb fite on Twitter about '10x engineers' with no idea what means

nashwan, Saturday, 13 July 2019 17:15 (six years ago)

developers' inability to use SQL these days does get a bit infuriating sometimes.

my colleague added a page to the CMS just to add values to a lookup table the other day then deleted the page when he was done, because he can't write an INSERT statement. but he is completely hopeless and hopefully will get fired soon

Colonel Poo, Saturday, 13 July 2019 18:28 (six years ago)

I'm not sure why SQL doesn't support regex out of the box really. it's completely trivial to add it to SQL Server with a C# CLR function, so why they don't just include it as standard I don't know. I think Postgres might support them?

Colonel Poo, Saturday, 13 July 2019 18:29 (six years ago)

Postgres has built in regex support yeah

president of deluded fruitcakes anonymous (silby), Saturday, 13 July 2019 18:33 (six years ago)

& mysql.

The Pingularity (ledge), Saturday, 13 July 2019 18:40 (six years ago)

and Oracle, I'm pretty sure (I use regexp_like and regexp_replace on a p. much daily basis)

I like SQL but I'm glad my queries are mostly for one-off reports and aren't called regularly or made available for Joe Public to dial up at will because the more interesting ones (and some of the less interesting ones) get really fucking slow

this is partly because the tables don't always join in a sensible manner and useful fields aren't indexed but also I don't know what I'm doing and can't read an "explain plan"

so, I like SQL, but should probably not be allowed to write queries used in the back-end of anything busy

a passing spacecadet, Saturday, 13 July 2019 18:53 (six years ago)

...I say I "like" SQL, I also swear at it a lot and find it ugly and etc

sometimes I have even been known to miss features from our previous database, a multi-value Pick database which felt like it was straight out of the 70s (though the iteration I was using was apparently out of the, ooh, 80s)

(the 2nd link there is the only reference material I could find anywhere apart from the original 80s manual, which was falling apart, jealously guarded on the boss's desk, and also borderline unreadable - so luckily that site there is actually very good and rescued me from many an impending disaster)

a passing spacecadet, Saturday, 13 July 2019 19:07 (six years ago)

I was about to say something that I thought was interesting and constructive, but instead read that Wiki and found that OS is named after Dick Pick.

I believe ILX has created a repository for this kind of stuff? Great Real Names ?

John Jacob Jingleheimer Schmidt, Saturday, 13 July 2019 20:30 (six years ago)

a standard regex query in sql sounds neat

the problem is probably related to a bunch of vendors coming up with extra shitty versions of useful features, fighting over what should be standard

a coworker did a presentation explaining how oracle’s xml querying (which was probably an insanely bad idea anyway) was so fucked they actually tore it out of a newer version and retooled it

generally if you want to do document storage or mongo stuff, just... use a document storage db. relational databases don’t need to include every damn thing and doing so just encourages people to do very bad things

untuned mass damper (mh), Sunday, 14 July 2019 04:46 (six years ago)

I can see not wanting to include regexes out of the box, since it's possible for an unlucky combo of regex and input string to max out CPU and bring the server to its knees. I think it was a bad regex that brought Cloudflare offline a few weeks ago.

o. nate, Monday, 15 July 2019 01:03 (six years ago)

yep that was a great postmortem.

president of deluded fruitcakes anonymous (silby), Monday, 15 July 2019 01:13 (six years ago)

who decided that percentages in en-US should have a space between the number and the percentage sign and can I shake them until their teeth rattle?

brigadier pudding (DJP), Wednesday, 17 July 2019 20:01 (six years ago)

three months pass...

that thing where it's easier to rewrite the code than it is to debug it.

(somewhere in ~3000 packets the data is getting out of sync but this only manifests as an error in the last packet. just can't nail it down)

((there's a peculiar case where you've got just enough data to go into a fixed-length packet but when you've added the extra 2 bytes to say that this is the last packet you no longer have the space for the all data, so this ends up being the last-but-one packet and you have to add another packet containing a single byte))

fwiw, the second attempt at the code is much neater.

koogs, Thursday, 17 October 2019 12:01 (six years ago)

as long as you're sure the original code didn't have obscure and undocumented but vital side effects...

The Pingularity (ledge), Thursday, 17 October 2019 15:18 (six years ago)

it's ALL obscure and undocumented side effects.

(it's not, it's new, non-production code, something i wrote 3 weeks ago and have spent the last two debugging. file in, slightly modified file out. unfortunately the output is fixed-length packets and some of the modifications add / remove one or two bytes from some of the packets, meaning all the rest of the data has to shuffle down and new packets may be created)

koogs, Thursday, 17 October 2019 16:14 (six years ago)

six months pass...

code review. github tells me 84 files have changed. +769 -451 lines

in those files there are *4* comments, all similar to this (but with different numbers, 1-4)


generateNoof(malUnits), // #1

koogs, Tuesday, 28 April 2020 15:41 (six years ago)

the "84 files changed" aspect of that is really what scares me the most

silby, Tuesday, 28 April 2020 15:57 (six years ago)

we recently went on a big code formatting kick and committed basically our entire codebase which sucks because now the 'show annotations/history' feature in RAD points every line to that one revision cuz it replaced all the tabs with spaces

frogbs, Tuesday, 28 April 2020 16:14 (six years ago)

my last job the codebase had a "tabs-to-spaces" commit that messed up git blames but it's possible to skip over it/reblame starting before that commit in various ways

silby, Tuesday, 28 April 2020 16:17 (six years ago)

cf git blame --ignore-rev

silby, Tuesday, 28 April 2020 16:17 (six years ago)

it's a refactor of some classes into smaller classes. so all the test classes need refactoring too. and then some test utility things have been changed to static methods so everything that used them have also changed.

(it might also be that the 84 is for the entire pull request whereas i've only looked at the first commit so far)

and some default formatter keeps dicking wih comments so you end up with stuff like

// very long comment that would be fine all on one line but the formatter
// disagrees

koogs, Tuesday, 28 April 2020 16:19 (six years ago)

wait, is RAD whatI think it is? If so, condolences

mh, Friday, 1 May 2020 04:00 (six years ago)

I finish bootcamp in two weeks, gang! :D

The Mandymoorian (Whiney G. Weingarten), Saturday, 2 May 2020 21:04 (six years ago)

Congrats...was this an online bootcamp? How was it affected by covid?

Which one did you do? Was it a Rails one, or JS, or something else?

cherry blossom, Saturday, 2 May 2020 21:24 (six years ago)

I did ReactJS!

I went to an actual campus six days a week until the COVID lockdown

The Mandymoorian (Whiney G. Weingarten), Saturday, 2 May 2020 21:34 (six years ago)

my last job the codebase had a "tabs-to-spaces" commit that messed up git blames but it's possible to skip over it/reblame starting before that commit in various ways

― silby, Tuesday, April 28, 2020 12:17 PM (four days ago) bookmarkflaglink

cf git blame --ignore-rev

― silby, Tuesday, April 28, 2020 12:17 PM (four days ago)


Wait, what? Oh see. This is like when merging with svn you would see the merger in the blame but not the original committer, I guess.

My Chess Hustler (James Redd and the Blecchs), Saturday, 2 May 2020 21:54 (six years ago)

Oh nice! https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

Judd Apatowsaurus (Leee), Saturday, 2 May 2020 22:33 (six years ago)

Cool

My Chess Hustler (James Redd and the Blecchs), Saturday, 2 May 2020 23:30 (six years ago)

lmao I didn't even realize that was a new feature, I perhaps haven't actually used that yet. idk whatever.

silby, Sunday, 3 May 2020 02:22 (six years ago)

anyway, condolulations Whiney

silby, Sunday, 3 May 2020 02:23 (six years ago)

Thanks!

The Mandymoorian (Whiney G. Weingarten), Sunday, 3 May 2020 02:54 (six years ago)

definitely going to make use of --ignore-rev from now on but it'll be a pain to set that up for every giant squash merge.

squash mergers being fucking savages is the only programming hill i'm willing to die on

diamonddave85​​ (diamonddave85), Sunday, 3 May 2020 16:42 (six years ago)

sorry whiney but you have to turn in your cool badge at the security desk now, prepare to be bullied, NERD

j., Sunday, 3 May 2020 18:50 (six years ago)

breh if i'm working on a giant project i'm definitely squash merging my fuckton of commits into 1 for the sake of keeping the master branch clean

RYMsnitch, Sunday, 3 May 2020 19:52 (six years ago)

smh if you aren’t interactively rebasing your feature branches into a glittering necklace of logical and well-described commits.

silby, Sunday, 3 May 2020 19:59 (six years ago)

sorry whiney but you have to turn in your cool badge at the security desk now, prepare to be bullied, NERD

― j., Sunday, May 3, 2020 2:50 PM (two hours ago) bookmarkflaglink

going from "geek" to "nerd" will be a difficult transition but not an impossible one

The Mandymoorian (Whiney G. Weingarten), Sunday, 3 May 2020 21:43 (six years ago)

It's been fun meeting people who have no idea what noise music is!

The Mandymoorian (Whiney G. Weingarten), Sunday, 3 May 2020 21:45 (six years ago)

silby otm.

Just you wait, Whiney.

My Chess Hustler (James Redd and the Blecchs), Sunday, 3 May 2020 23:06 (six years ago)

having a true commit history is infinitely more useful than having a clean master branch. also you should be doing what silby said

diamonddave85​​ (diamonddave85), Sunday, 3 May 2020 23:27 (six years ago)

always said i'd leave ilx after stet adds inline manscaped adds

Morton Koopa Jr. Sings Elvis (Sufjan Grafton), Monday, 4 May 2020 00:56 (six years ago)

Congratulations whiney!

treeship., Monday, 4 May 2020 02:24 (six years ago)

I did ReactJS!

Welcome fellow ReactJS dev!

cherry blossom, Monday, 4 May 2020 06:20 (six years ago)

"I did ReactJS!"

How is the 40 hour course on Udemy, anyone know?

xyzzzz__, Monday, 4 May 2020 14:23 (six years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.