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
sarehu
Apr 20, 2007

(call/cc call/cc)

Dr Monkeysee posted:

the twist ending is we're all idiot programmers

I'm not!

Adbot
ADBOT LOVES YOU

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
https://twitter.com/dril/status/134787490526658561

comedyblissoption
Mar 15, 2006

with the advent of java 8, go now gets to have the title of most boring mainstream language

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
go is insanely boring but sometimes you need boring

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

uncurable mlady posted:

go is insanely boring but sometimes you need boring

yeah but you never need poo poo

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Sweeper posted:

yeah but you never need poo poo

yet people keep using ruby and node

Bloody
Mar 3, 2013

they certainly don't use them from a place of need, just stupidity

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Bloody posted:

they certainly don't use them from a place of need, just stupidity

this is somewhat of a distinction without difference

Xarn
Jun 26, 2015
If being frustrated after having to keep running SW that was made by lowest cost Indian outsourcer makes me rear end in a top hat, then :shrug:

The industry made me that way. :v:

gonadic io
Feb 16, 2011

>>=
please don't conflate programming skill/experience/training with intelligence (or nationality) tia

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

gonadic io posted:

please don't conflate programming skill/experience/training with intelligence (or nationality) tia

cheap outsourcing shops have perverse incentives to deliver garbage even if they're capable of delivering quality.
there are a large number of these in India (for software specifically). china/argentina have similar shops for art. i'm sure other fields have similar orgs.

it's not unreasonable to conflate cost with expected quality..

Bulgogi Hoagie
Jun 1, 2012

We

Dr Monkeysee posted:

the twist ending is me, I am an idiot programmer

Shaggar
Apr 26, 2006

Sapozhnik posted:

c# is only just gaining a credible port to Linux. Maybe in five years when it has a credible track record I'll consider it. As I keep saying, I really wish Java had async/await, but the stupefying badness of the java.util.concurrent.Future interface makes this rather difficult.

java 8 + guava + guice + autovalue = extremely good (and maven of course, but you already knew that)

one of c#'s greatest strengths is not running on linux.

Shaggar
Apr 26, 2006

Asymmetrikon posted:

C# also needs a better SQL mapper.

yes that's true

Shaggar
Apr 26, 2006
ive been using dapper but its definitely no mybatis

Bloody
Mar 3, 2013

I don't know what a mapper does

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

I don't know what a mapper does

whine about GIS probably

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!

Bloody posted:

I don't know what a mapper does

helpers for the interface layer between your model objects and the database. kind of like a more explicit orm that doesn't suck. Dapper (the C# mapper) basically just adds a method Query<T> to SQL connection objects that takes a string of SQL, an object of parameters for that sql, and returns a T (or a collection of T) automatically "mapped" from the query result.

Bloody
Mar 3, 2013

ooh neat so it does a bunch of reflection stuff or something?

jony neuemonic
Nov 13, 2009

dapper is very good, i enjoy using it.

jony neuemonic
Nov 13, 2009

is it still pretty easy to wire up dapper and asp.net identity? because i sure would like to get entity framework out of my life.

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!

Bloody posted:

ooh neat so it does a bunch of reflection stuff or something?

yeah, kind of - it basically just takes a query result and either builds an object out of it based on the column names, or an IEnumerable. So you can do like,
code:
conn.Query<User>("SELECT id, username, passwordHash FROM users");
and get out an IEnumerable<User> where User is something that has an Id, Username, and PasswordHash. Unfortunately, it's hard to get it to do non-default things, so you have to massage your models afterwards if your database structure isn't perfect.

MyBatis is a Java mapper, but it sort of extracts the mapping into XML configuration or annotations, and lets you fully define the interface between your tables and models. it would be really nice if there was a good, well-maintained C# batis, but dapper does alright in the meantime.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Asymmetrikon posted:

yeah, kind of - it basically just takes a query result and either builds an object out of it based on the column names, or an IEnumerable. So you can do like,
code:
conn.Query<User>("SELECT id, username, passwordHash FROM users");
and get out an IEnumerable<User> where User is something that has an Id, Username, and PasswordHash. Unfortunately, it's hard to get it to do non-default things, so you have to massage your models afterwards if your database structure isn't perfect.

MyBatis is a Java mapper, but it sort of extracts the mapping into XML configuration or annotations, and lets you fully define the interface between your tables and models. it would be really nice if there was a good, well-maintained C# batis, but dapper does alright in the meantime.

idgi. if User is just something with id, username and password hash, how is it coming back to you as IEnumerable<User> any more useful than it just being IEnumerable<ResultTuple>.

e: nm, I know what we're talking about. I think we just oversimplified and now it seems pointless.

DONT THREAD ON ME fucked around with this message at 02:13 on Oct 12, 2016

jony neuemonic
Nov 13, 2009

MALE SHOEGAZE posted:

idgi. if User is just something with id, username and password hash, how is it coming back to you as IEnumerable<User> any more useful than it just being IEnumerable<ResultTuple>.

e: nm, I know what we're talking about. I think we just oversimplified and now it seems pointless.

at some point you're going to want to turn that ResultTuple into something closer to your domain. mappers save you writing and maintaining the glue code.

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

Shaggar posted:

one of c#'s greatest strengths is not running on linux.

mono is good

brap
Aug 23, 2004

Grimey Drawer
mono is a disease

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

you just gotta own it, man

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Asymmetrikon posted:

helpers for the interface layer between your model objects and the database. kind of like a more explicit orm that doesn't suck. Dapper (the C# mapper) basically just adds a method Query<T> to SQL connection objects that takes a string of SQL, an object of parameters for that sql, and returns a T (or a collection of T) automatically "mapped" from the query result.

Would that be what you'd call Django's raw sql?

i know once I figured that poo poo out years ago I've used it extensively when I'm on a django project because it's awesome

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

leper khan posted:

mono is good
that is incorrect

i assume you've never tried to run a big c# server app in production on mono, on linux? (and if you haven't, don't worry, you have made the right choice there)

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

Sagacity posted:

that is incorrect

i assume you've never tried to run a big c# server app in production on mono, on linux? (and if you haven't, don't worry, you have made the right choice there)

lomarf, no, why would you do that when you could just deploy to azure or whatnot

i have used mono to work on .net projects on my mac and it works ok. it's good.

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Thermopyle posted:

Would that be what you'd call Django's raw sql?

i know once I figured that poo poo out years ago I've used it extensively when I'm on a django project because it's awesome

isnt this like "how to get SQL injection 101"? why wouldn't u just use an ORM like SQLAlchemy?

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
SQL injection comes from allowing users to supply data that "runs" as a raw part of a sql query, which you should never do and can solve by using parameterized sql correctly, so that's not an issue. The reason to not use an ORM is that ORMs, while okay for small applications and things that are built from the ground up and structured for that ORM, can't handle complex SQL as well as a human can yet.

more like dICK
Feb 15, 2010

This is inevitable.
I'm writing c++ for the first time in like 3 years and my opinion is that c++14 seems good.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Mr SuperAwesome posted:

isnt this like "how to get SQL injection 101"? why wouldn't u just use an ORM like SQLAlchemy?

django already has an ORM so no need for SQLAlchemy. you use rawSQL in Django for better expressing non-trivial queries and then getting the results back as your ORM models.

as mentioned sql injection isn't really an issue here

Xarn
Jun 26, 2015

more like dICK posted:

I'm writing c++ for the first time in like 3 years and my opinion is that c++14 seems good.

Its nice.

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

more like dICK posted:

I'm writing c++ for the first time in like 3 years and my opinion is that c++14 seems good.

it feels like the language finally has the tools to properly express its semantics. like the c++ ownership model hasn't changed since day one but it was always a clusterfuck to implement because you couldn't actually say what you meant.

on the other hand the language is so very large that i just become overwhelmed by the possibilities and give up.

Pollyzoid
Nov 2, 2010

GRUUAGH you say?
some stuff about the insides of windows subsystem for linux https://www.youtube.com/watch?v=_p3RtkwstNk

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Pollyzoid posted:

some stuff about the insides of windows subsystem for linux https://www.youtube.com/watch?v=_p3RtkwstNk

good ol ion, the single least creative person on the planet. reverse engineer by birth

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
so, virtual member function pointers, right? just a vtable index in type-safe drag, right? in visual c++ 15 (2008), they are flat function pointers. what function do they point to? a stub that jumps to a hardcoded vtable slot :cripes:

loving microsoft

e: "but we made it a comdat so we're good, guys?" :fuckoff:

in their defense they switched to a sane layout in recent versions but still. loving microsoft

hackbunny fucked around with this message at 18:00 on Oct 19, 2016

Adbot
ADBOT LOVES YOU

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
their member function pointer representation is so much more complicated than you're giving it credit for

i didn't know that they'd changed it to not thunk virtual functions, though. also not sure what you think the problem is with that

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