Programming as a career

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

i just used an sql query the other day!

j., Friday, 7 June 2019 17:59 (seven years ago)

it reeeeally depends on what you're doing

persistence and mapping frameworks are good enough now that, unless it's really high traffic or a very complex table structure, it's a good idea to *not* write your own queries

I think the new status quo is fine because developers wrote too much bad sql

mh, Friday, 7 June 2019 18:24 (seven years ago)

I wrote a few queries the last few weeks but they're being used in a data transfer tool

btw I'm all in favor of Apache NiFi now, as long as it's used intelligently. nice software!

mh, Friday, 7 June 2019 18:26 (seven years ago)

The trouble is using ORMs exclusively will not teach you how to design a database well, and depending on the ORM can teach you actively bad ways of using a database.

don't mock my smock or i'll clean your clock (silby), Friday, 7 June 2019 18:32 (seven years ago)

oh, for sure. someone else should be designing your database, but the majority of the people actually writing software to hit the database, no prob

do NOT do the code-first, auto-generate the database path if it's going to be hit by more than one application. a particularly bull-headed jerk of a former coworker apparently was the software architect for a piece of software where he did exactly that and he completely fucked the project and I think people realized he wasn't as good as he liked to claim. dude should not have been designing anything used by more than a couple people imo

mh, Friday, 7 June 2019 18:36 (seven years ago)

one month passes...

"Payment amount
£54.2400"

dunno who's doing the QA at (large electricity provider)'s website but they need to be better than they are.

had an hungarian tester once who did a report which contained a *mix* of european format numbers and english numbers. wasn't even consistent within the same one page email, really confusing. ie:

25,456 = 25 thousand 4 hundred and fifty six in english, 25 and 456 thousandths in hungarian

4.294 = 4 thousand 2 hundred and 94 in hungarian, 4 and 294 thousandths in english.

https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html

koogs, Friday, 12 July 2019 18:03 (six years ago)

While not a “programmer” I love SQL - so simple, so elegant

calstars, Friday, 12 July 2019 18:39 (six years ago)

Me too! I love that its grammar is so much closer to natural (english) language than anything else I've worked with. It's intuitive! More so for "verbal" people than "quantitative" people, I think, if that's a real distinction

Dan I., Friday, 12 July 2019 19:12 (six years ago)

It’s a language for writers

calstars, Friday, 12 July 2019 19:14 (six years ago)

y'all would love COBOL then :)

frogbs, Friday, 12 July 2019 19:32 (six years ago)

I agree that SQL is intuitive and expressive for a large range of problems. Unfortunately it also leads developers to put a lot of business logic in the database which is kind of an anti-pattern.

o. nate, Friday, 12 July 2019 19:35 (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, 12 July 2019 19:39 (six years ago)

lol dan have you tried a little language called ~applescript~

j., Friday, 12 July 2019 19:47 (six years ago)

SQL itself is adequate, it’s relational databases that are truly a great invention

president of deluded fruitcakes anonymous (silby), Friday, 12 July 2019 20:22 (six years ago)

On the other end of the (in)comprehensibility spectrum, I find myself forced to trial-and-error my way through a regex thing (program? query?) today and wow, I fucking hate this. This kind of Perl-like bullshit needs to die forever

Dan I., Friday, 12 July 2019 20:59 (six years ago)

(I know, it's "powerful" or whatever, but as a human being--*barf*)

Dan I., Friday, 12 July 2019 21:00 (six years ago)

Oh I see, Perl descended from regex. That makes sense

Dan I., Friday, 12 July 2019 21:02 (six years ago)

perl is ludicrous but with regex I'm grateful to not have to write 50+ lines of complicated loops just to do a search and replace.

The Pingularity (ledge), Friday, 12 July 2019 21:23 (six years ago)

I saw the best minds of my generation destroyed by Perl-induced madness.

Vini C. Riley (James Redd and the Blecchs), Friday, 12 July 2019 21:26 (six years ago)

SQL is fun. But it’s when dealing with massive amounts of data that things get frustrating. Large amounts of data is rarely organized in a way that allows you to write “elegant” SQL, unfortunately.

John Jacob Jingleheimer Schmidt, Friday, 12 July 2019 21:40 (six years ago)

perl is the most wonderful language i ever learned and you are all monsters

j., Friday, 12 July 2019 21:44 (six years ago)

xp yeah but it isn't really made for that, I'm a 'write a readable query and parse the data in Java' sorta guy

lately I've had to write a lot of queries involving aggregates and subsets its frustrating because I get into a lot of situations where it's like..."ok I can do this and this and that, but I can't figure out how to do ALL of it together, even though I'm 90% sure there's a way to do it"

frogbs, Friday, 12 July 2019 22:20 (six years ago)

I fall into the trap of trying to craft a single query to do some complex things that are probably better left as multiple queries, but I also use Rails which makes that kind of data manipulation much easier.

The Worf of Wall Street (Leee), Friday, 12 July 2019 22:32 (six years ago)

Crafting a single query to do a complex thing is fun as hell to me now, I love doing it. Sometimes I give up and cheat with a temp table :(

president of deluded fruitcakes anonymous (silby), Friday, 12 July 2019 23:13 (six years ago)

ive a fella from dundaaàwk ahint me at work tackling some new code or something and he has taken to yeowling "och ye know wharray fucking meant ye tick baawstird" at his screen oh maybe ten times an hour

phil neville jacket (darraghmac), Friday, 12 July 2019 23:27 (six years ago)

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)


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