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
HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance
what kind of loving idiot uses three spaces to indent god it's so aggravating

Adbot
ADBOT LOVES YOU

abraham linksys
Sep 6, 2010

:darksouls:

HORATIO HORNBLOWER posted:

what kind of loving idiot uses three spaces to indent god it's so aggravating

had this loving poo poo in a bunch of html templates in our codebase

was incredibly obnoxious

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

abraham linksys posted:

had this loving poo poo in a bunch of html templates in our codebase

was incredibly obnoxious

yeah, markup languages in a code base? that'd piss me off too

also dont use orms use stored procedures

power botton
Nov 2, 2011

orms are the worst loving thing ever

power botton
Nov 2, 2011

sorry for the controversial opinions.

also i just learned that django-admin can generate models/migrations whatever from an existing db which owns. lol that rails can't do that.

MrMoo
Sep 14, 2000


Developers, developers, developers. They get all the worst tools on Windows.

Actually I think The Carmack said Windows debugging has been improving recently, he previously used Linux ports for Valgrind.

http://www.develop-online.net/news/43192/Carmack-No-mainstream-business-case-for-Linux

Stringent
Dec 22, 2004


image text goes here

Jonny 290 posted:

yeah, markup languages in a code base? that'd piss me off too

also dont use orms use stored procedures

it's just kinda depressing when you do it

Nomnom Cookie
Aug 30, 2009



i like ORMs when theyre like



but probably not if im gonna be maintaining it. spring data is hella cool tho

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
entity framework is okay if you only use like half the features and only for super simple CRUD stuff. anything involving multiple tables is automatically sql/stored proc territory

shrughes
Oct 11, 2008

(call/cc call/cc)
I think the 3-space indent thing comes from some version of BLOODSHED Dev-C++ that defaulted to a 3-space indent. Have any other tools in the history of mankind done that?

Shaggar
Apr 26, 2006

Jonny 290 posted:

yeah, markup languages in a code base? that'd piss me off too

also dont use orms use stored procedures

:hfive:

Socracheese
Oct 20, 2008

in django i make my db be compatible with the orm and i use it when its easy like

user = User.objects.get(name="shitlord mcfuckstein")

but i write my own sql queries when i need to do anything like multiple relations

where does that put me on the pro/scrub scale

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
scrub

Shaggar
Apr 26, 2006
scrub points for django and orm.
pro points if you are using a statement mapper for the sql
doublescrub points if your query is sitting in code
triplescrub points if you aren't at least using parameterized sql.

Socracheese
Oct 20, 2008

I do parametrized sql but yeah my queries hang out in my code

its not a very big project and i am in charge and the least ignorant on these topics

i have never heard of statement mapping

i probably need to read a book

e: honestly is there really a 'pro' way to do webdev (pre-emptive shaggar response: 'yes use java')

Bloody
Mar 3, 2013

Socracheese posted:

honestly is there really a 'pro' way to do webdev (pre-emptive shaggar response: 'yes use .net mvvm')

power botton
Nov 2, 2011

asp mvc 4 with knockout.js, which is conveniently included by default

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Socracheese posted:

I do parametrized sql but yeah my queries hang out in my code

its not a very big project and i am in charge and the least ignorant on these topics

i have never heard of statement mapping

i probably need to read a book

e: honestly is there really a 'pro' way to do webdev (pre-emptive shaggar response: 'yes use java')

java + spring/guava + hibernate/mybatis + tomcat/jetty/glassfish + postgres/mssql -> success

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
what is a statement mapper? my queries hang out in code so doublescrub points for me I guess :(

uG
Apr 23, 2003

by Ralp

quote:

The subject of object/relational mapping technologies came up, and it was there and then that I first coined the phrase, "Object/relational mapping is the Vietnam of Computer Science".
http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx

Bizarro Buddha
Feb 11, 2007
Slides about the different pointer types in Rust, particularly borrowed pointers.

http://smallcultfollowing.com/babysteps/pubs/2013.07.17-NEU.pdf

You can template Rust functions on the lifetime of a variable.

Shaggar
Apr 26, 2006

Plastic Snake posted:

what is a statement mapper? my queries hang out in code so doublescrub points for me I guess :(

basically you map a method and its parameters in code to a sql statement and parameters. For example lets say you have the statement
Java code:
List<Boner> boners = bonerTown.getBoners(int length, int girth); 
And have a stored proc named getBonersByLengthAndGirth_sel_sp that we want to execute when the method is called.

now traditionally you might have the bonerTown object contain some database code that builds the sql or maybe does some orm crap. with a statement mapper you say "map the call to getBoners in my code to getBonersByLengthAndGirth_sel_sp in my list of statements. Here is an example of the map:

XML code:
<statement id="getBoners" resultClass="Boner">
CALL getBonersByLengthAndGirth_sel_sp({length},{girth})
</statement>
Then you have 2 options. You could instantiate a mapper object and tell it to run a statement and give you the result ex:
code:
public List<Boner> getBoners(int length, int girth)
{
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("length",length);
paramMap.put("girth",girth);
return this.mapper.getList("getBoners",paramMap);
}
This builds a parameter map and calls a statement with the id "getBoners" and returns the result (as a list). But this is a silly extra step cause we can just use mybaits-spring to figure out which statement to call based on the name of the method and what parameters go where in the statement based on parameter name. Since the method name and the id of the statement match and the parameter names match, spring-mybatis can create a proxy object so any time you call bonerTown.getBoners the call is intercepted and it handles mapping the statement + params and running the sql.

When you do this correctly there is no mention of any database stuff anywhere in your code and the implementation can be a runtime dependency instead of a compile time dependency. This way you can make ur tests eaiser and also do do cool stuff like swap a local database implementation of the interface for a remote service interface. Super handy!

its pretty good and way nicer than trying to manage sql in code like some weirdo or getting stuck refactoring a bunch of poo poo when you decide you want to change the implementation.

FamDav
Mar 29, 2008
shaggar stylin on bitches itt

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal
I don't usually agree with the shags but all my java+db projects are rockin mybatis-guice

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

obstipator posted:

node is cool & good. eat poo poo haterz

if you don't want callback hell, try out this thing: https://github.com/visionmedia/co
the good nodejs guy that made express and other things made it, so it's probs good. someone here try it out and tell me if its good so i dont have to waste my`are hard earned time testing it

node isn't really that great actually, because you have to use javascript. cya

havelock
Jan 20, 2004

IGNORE ME
Soiled Meat
I like to use stored procs because every time I need to filter or sort differently I get to write a whole other new sproc and then configure it with my statement mapper. Sometimes I'm lazy and just do basic operations easily handled by a database in memory instead after loading the whole object set, though.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i'm making a browser extension is there an alternative to javascript?

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


chumpchous posted:

i'm making a browser extension is there an alternative to javascript?

i hear jquery is a good language

Bloody
Mar 3, 2013

chumpchous posted:

i'm making a browser extension is there an alternative to javascript?

u could use coffeescript

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Bloody posted:

u could use coffeescript

the problem with coffeescript is you have to learn javascript before you can learn coffee script, so what is the loving point at all?

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
well you see the point is *sips coffescript*

crazysim
May 23, 2004
I AM SOOOOO GAY
dart? who knows.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
coffeescript is retarded as hell. javascript is a really good language on its own

Posting Principle
Dec 10, 2011

by Ralp

chumpchous posted:

i'm making a browser extension is there an alternative to javascript?

you can use c++ by compiling a custom build of chromium or something

Nomnom Cookie
Aug 30, 2009



XPCOM

Bloody
Mar 3, 2013

you could also use one of the various language x to javascript transcompilers

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
read 'javascript the good parts' and dwi that's what I think

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

chumpchous posted:

i'm making a browser extension is there an alternative to javascript?
activex bro

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

chumpchous posted:

i'm making a browser extension is there an alternative to javascript?

java applets

Adbot
ADBOT LOVES YOU

Plastic Snake
Mar 2, 2005
For Halloween or scaring people.
thanks shags that sounds pretty sweet. I will do some looking around on c# equivs and see what I can do

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