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.
 
  • Post
  • Reply
JawnV6
Jul 4, 2004

So hot ...

YeOldeButchere posted:

Calling through a function pointer uses the exact same ABI as a direct call, all registers and the stack are set in the exact same way, except that the target for the call is stored in a register or known memory location instead of being (most likely) hardcoded with the call instruction.
I wasn't talking about anything close to this.

Subjunctive posted:

But what's in the switch blocks? Calls through that struct of function pointers? Calling through a vtable in a switch statement is not exactly an edge case.
My same #defined register addresses I complained about last time I was in here lamenting.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i wish -Bsymbolic-functions was default behavior everywhere

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Zemyla posted:

A couple years back, WordPress (who is super insistent about having a capital P in the middle) pushed an update with a function called capital_P_dangit, which automatically changes instances of Wordpress (lowercase p) to WordPress (capital P). This broke several people's URLs and was massively unpopular, and yet took 5 months for them to revert the simple change.

How many other massively unpopular features are being kept because of a personal crusade on a lead developer's part?

A quick trip down the rabbithole later:

quote:

* Resolution set to wontfix
* Status changed from new to closed

For preserving historical mistakes I recommend using the HTML entity for the lowercase letter p, which I can't find right now. There's also probably a way to trick it with unicode, invisible spaces, or cats. It is impossible for the function to be perfect, and its cost goes up with any attempt, so we have to embrace the imperfection of it, as with life.

(I realize that's a funny thing to say when talking about a function whose goal is to correct an imperfection itself.)

And just think, he could have wasted that time fixing one of the thousands of security holes Wordṕress had at the time.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Wordρress :redass:

xzzy
Mar 5, 2009

The central web service folks where I work started offering wordpress earlier this year, to help scientists get their stuff online.

It hasn't been compromised yet, which might be a record but on the other hand I don't know if anyone's actually using it.

BigRedDot
Mar 6, 2008

fleshweasel posted:

I don't see what is inadequate about the types of data JSON supports. It seems a more reasonable than XML on that count actually.

No support for NaN or Inf? You can add a custom serializer but it slows everything the gently caress down.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
http://shaunlebron.github.io/parinfer/index.html

Maybe I'm the coding horror, but it's amazing to me that someone could go to the immense amount of effort this project entails without apparently considering that the machinery necessary to maintain and manipulate s-expressions suggests that they aren't a good representation for code. Is all this inconvenience in every line of code really justified by convenience in writing macros every once in a while?

jony neuemonic
Nov 13, 2009

Internet Janitor posted:

http://shaunlebron.github.io/parinfer/index.html

Maybe I'm the coding horror, but it's amazing to me that someone could go to the immense amount of effort this project entails without apparently considering that the machinery necessary to maintain and manipulate s-expressions suggests that they aren't a good representation for code. Is all this inconvenience in every line of code really justified by convenience in writing macros every once in a while?

Seems like the guy just enjoys experimenting to me. :shrug:

I don't personally find s-expressions arduous to write so I don't really see the practical use of this project, but programmers are notorious tinkerers.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

jony neuemonic posted:

Seems like the guy just enjoys experimenting to me. :shrug:

I don't personally find s-expressions arduous to write so I don't really see the practical use of this project, but programmers are notorious tinkerers.

Now if someone could find a way to let me comment a line of SQL without the need to move parentheses or commas around, that would be useful.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
wait, people actually write SQL and don't just generate it?

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.
Yes :(

xzzy
Mar 5, 2009

I like doing queries, developing schemas not so much.

But there's something cool about having tons of data that you can extract meaning from with a couple selects.

Storysmith
Dec 31, 2006

Suspicious Dish posted:

wait, people actually write SQL and don't just generate it?

Somebody has to write the chunks the ORM chains together.

Speaking of horrors and SQL: when talking about an API for their software, a vendor referred to their "SQL API"-- "here's our schema, these are the things that will stay stable, write something that reads and writes to the same DB tables as us!"

I mean, it's hard to make a PHP webapp return json or soap, so let's just go all the way around any app-level data validation and slamfuck our data into your tablespace.

...they didn't get the sale.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.
Sometimes you want something that's just not easy to force your ORM to do like joining a table on itself, window functions, etc.

jony neuemonic
Nov 13, 2009

I also enjoy writing SQL, so maybe I'm the horror after all.

NihilCredo
Jun 6, 2011

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

jony neuemonic posted:

I also enjoy writing SQL, so maybe I'm the horror after all.

Same here. Any time I write a new feature, I start with "OK, how much of this business logic can I just write as a query/sproc?", because I know it won't break from random code changes and also it's often orders of magnitude faster.

Persistence ignorance sure sounds nice, but in this particular case I think tight coupling offers far more advantages.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
In principle, an SQL interface is something you could reasonably guarantee with views, and honestly it is a lot more extensible for a data service to expose a general queryable interface than to provide some extremely limited and probably also extremely inefficient abstract interface through stored procedures / rpc calls.

In practice, as a client I'd want to know that that data service is really paying attention to the exact set of queries I'm emitting, and as the service I'm not sure I'd ever be that comfortable putting my life in the hands of the query optimizer.

loinburger
Jul 10, 2004
Sweet Sauce Jones
Boss: First we're going to copy all of the data to a temporary table, then we're going to switch the view to point to the temporary table, then we're going to write the new data to the primary table, then we're going to switch the view to point back to the primary table. That way the user won't see a partial update.

loinburger: Why not just use a transaction?

Boss: I don't want to use a transaction.

loinburger: Why not?

Boss: I just don't.

*****

Co-worker: I'm going to rewrite all of the batch processing code to use RxJava.

loinburger: We can incorporate RxJava without rewriting everything...

Co-worker: Yeah, but the current batch processing code doesn't have enough unit tests.

loinburger: I agree, so we could write some more unit tests for it...

Co-worker: No, I want to rewrite all of the code.

loinburger: This is sort of insane. Hey Client, do you have an opinion on this?

Client: I've got unlimited money and no deadline, so I don't really give a poo poo.

*****

So now I've decided to teach myself iOS programming until my co-worker finishes with the refactor or until they fire me.

loinburger fucked around with this message at 15:58 on Nov 12, 2015

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

loinburger posted:

Client: I've got unlimited money and no deadline, so I don't really give a poo poo.

Can I have your client?

loinburger
Jul 10, 2004
Sweet Sauce Jones
I don't understand why he's paying us to write a program that he apparently doesn't even want, but why look a gift horse in the mouth.

Karate Bastard
Jul 31, 2007

Soiled Meat
Calling it right now: in two months they will have never wanted it, and you are wasting time writing useless features noone wants instead of this new feature they now have paid you to write for two months, to which you will say :smith:.

Karate Bastard fucked around with this message at 18:41 on Nov 12, 2015

Linear Zoetrope
Nov 28, 2011

A hero must cook
I just dug up one of my first programs from school. It involved a deck of cards.

I wrote a separate class for each card that implemented a common Suit/Number interface. :negative:

sarehu
Apr 20, 2007

(call/cc call/cc)
In coding non-horrors, I once saw a savagely optimized Notepad replacement written in assembly, and then later I couldn't find it again! But now I did:

SavageEd

It has a 14 KB executable and supports Unix-style line endings.

Winter Stormer
Oct 17, 2012

sarehu posted:

In coding non-horrors, I once saw a savagely optimized Notepad replacement written in assembly, and then later I couldn't find it again! But now I did:

SavageEd

It has a 14 KB executable and supports Unix-style line endings.

Well, I know what I'll run on my next floppy disk OS install

baquerd
Jul 2, 2007

by FactsAreUseless

loinburger posted:

Client: I've got unlimited money and no deadline, so I don't really give a poo poo.

Yeah baby, I like it when you talk dirty to me. :10bux: :10bux: :10bux: :10bux: :10bux:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Internet Janitor posted:

https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx / http://www.eclipse.org/

Maybe I'm the coding horror, but it's amazing to me that someone could go to the immense amount of effort these projects entail without apparently considering that the machinery necessary to maintain and manipulate large class libraries suggests that they aren't a good representation for code. Is all this inconvenience in every line of code really justified by convenience in library depth every once in a while?

JawnV6
Jul 4, 2004

So hot ...
I've never had an auto-brace that didn't surprise me regularly. Both in what it would figure out and what it wouldn't. It just adds a layer of unexpectedness similar to wondering what autocorrect is going to do next time I try to type the acronym for serial peripheral interface. Probably api, because why not.

That said, VS/C#'s auto-whitespace is the bees knees.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Bognar posted:

Can I have your client?

FlapYoJacks
Feb 12, 2009
The guy before me programmed an entire back-end to our product in Python.

That's not the horror. He did it all in VIM while ignoring PEP8 completely.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



https://pypi.python.org/pypi/PythonTidy doesn't work?

I mean, it'll gently caress your diffs in the ear but one annoying merge isn't a high price to pay.

ExcessBLarg!
Sep 1, 2001
What's wrong with Vim?

sarehu
Apr 20, 2007

(call/cc call/cc)
Vim is a honeypot for people with poor state.

Edit: Taste! Poor taste! But also state.

FlapYoJacks
Feb 12, 2009

ExcessBLarg! posted:

What's wrong with Vim?

Nothing really, but it sure as hell didn't warn him about anything. Tons of small warnings as well.

The whole thing is a mess and go through a lint party before too long.

Karate Bastard
Jul 31, 2007

Soiled Meat

ratbert90 posted:

The guy before me programmed an entire back-end to our product in Python.

That's not the horror. He did it all in VIM while ignoring PEP8 completely.

OK, biting; what was it in before.

e: nope, dumb; thought you said "reprogrammed".

ExcessBLarg!
Sep 1, 2001

sarehu posted:

Vim is a honeypot for people with poor state.
Funny, I've had the opposite experience. People who use Vim have managed to get themselves over a major learning hurdle. That dedication correlates with being conscientious about coding style.

It's the "well Eclipse just did whatever" people who tend to have really oddly formatted code.

VikingofRock
Aug 24, 2008




ratbert90 posted:

The guy before me programmed an entire back-end to our product in Python.

That's not the horror. He did it all in VIM while ignoring PEP8 completely.

Introduce him to syntastic with pylint.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Storysmith posted:

Somebody has to write the chunks the ORM chains together.

Speaking of horrors and SQL: when talking about an API for their software, a vendor referred to their "SQL API"-- "here's our schema, these are the things that will stay stable, write something that reads and writes to the same DB tables as us!"

I mean, it's hard to make a PHP webapp return json or soap, so let's just go all the way around any app-level data validation and slamfuck our data into your tablespace.

...they didn't get the sale.

I worked with commercial .NET software that bragged in its documentation about its separation of business logic from presentation logic. The first example they provided was an XSLT template with embedded SQL queries.

FlapYoJacks
Feb 12, 2009

VikingofRock posted:

Introduce him to syntastic with pylint.

I would if he was still working at this place. He was fired for being a incompetent jackass with a passion for writing purposefully obscure code as a means to make himself indispensable.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

ExcessBLarg! posted:

Funny, I've had the opposite experience. People who use Vim have managed to get themselves over a major learning hurdle. That dedication correlates with being conscientious about coding style.

I've had the opposite experience, where they haven't gotten over the hurdle after months and still spend half their time fighting the editor and googling "vim how do I search". Yet they keep using it because it's somehow 'more pro'

Adbot
ADBOT LOVES YOU

NihilCredo
Jun 6, 2011

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

I also get the impression that 3/4ths of the fancy stuff vim users brag about can usually be done just as fast with a regex ("I can type a command to replace all the text between braces!").

And becoming fluent with regex is both easier and far, far more applicable than becoming comfortable with vim.

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