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.
 
  • Locked thread
double sulk
Jul 2, 2010

Impromptu Flip posted:

going through projects to find things i want is getting cumbersome, there's got to be a better way!!!

searching throug snippets seems like it would be easy & convenient


that sounds p ghetto but the toc is a good idea

i'll try out dash, i looks like it just nags you if you don't pay

iirc dash was originally good and then the pay thing made it garbage but idk

if you wanted the super cheap and lazy route you could private gist everything

Adbot
ADBOT LOVES YOU

double sulk
Jul 2, 2010

actually thats a p decent idea, an app where you can submit gists and throw flags on them with an @ sign or something then query all related gists based on the title. the github api would support it afaik

power botton
Nov 2, 2011

you can also use text expander to shortcut useful things like this:

steve jobs = SJ = salty jizz = cum = ball gunk = BG = bill gates ? coincidence ?

as "jobs=gates"

to include in code, emails, or anything else!

Shaggar
Apr 26, 2006
I cant think of any snippets I'd want to reuse that aren't just part of a library already. altho both eclipse and vs let u save ur own snippets

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

Impromptu Flip posted:

that sounds p ghetto but the toc is a good idea

i'll try out dash, i looks like it just nags you if you don't pay

yeah it's hell of ghetto but i'm a lovely p-langer so i feel it's appropriate

CamH
Apr 11, 2008

i email snippets to my coworkers and go ask them to email me snippets back when i need them. this gives me an excuse to waste hours a day hovering around people's cubicles drinking coffee

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

prefect posted:

are orms a good idea if you're working on something where the database performance becomes important?

any individual case where you might run into that problem you can replace the ORM with a sproc

Shaggar
Apr 26, 2006
aka every orm use case

BONGHITZ
Jan 1, 1970

shaggar's avatar someone help please

uG
Apr 23, 2003

by Ralp

BONGHITZ posted:

shaggar's avatar someone help please

:gowron:

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Shaggar posted:

aka every orm use case

shaggar was... wrong???

(aka when you want to do a SELECT blah FROM t1 INNER JOIN t2 ON t1.t2id = t2.id where t1.name = 'buttes' there's nothing wrong with letting Entity Framework generate that busywork for you)

Shaggar
Apr 26, 2006
entity framework blows. also orms suck cause your application model and your data model can and likely will be different and trying to cram them together sucks and having to translate from orm data objects to application model objects sucks. use stored procs to translate from db to application so you don't have to deal with crappy orm middlemen

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
boy I sure love debugging lovely sql

you cannot defeat me now shaggar; I am on US timezone

Shaggar
Apr 26, 2006
its easier to debug sql that is written in sql than it is to debug sql written in whatever garbage intermediate your orm has

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Shaggar posted:

its easier to debug sql that is written in sql than it is to debug sql written in whatever garbage intermediate your orm has

hate to appeal to authority but we have this huge product with a million sprocs and funcs that call other sprocs and funcs and it loving sucks compared to some C# you can actually attach a debugger and step through

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
i'm also struggling to think of a time when an ORM has written some truly buggy as opposed to just plain old inefficient SQL

(i've only used LINQ to SQL, nHibernate and EF though)

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
I've figured out my next rounds of dev for @Fayettevillains

-Web interface (django learnin' project)
--gmaps display with crimes overlaid
--adjustable slider to show a time range, default to 'last 4 hours to now' or something
--Later on I want to add a function where you click a spot on the map, specify a radius, enter your email or SMS and it will notify you if a dispatch occurs in that radius

-DB rework
--Break out all the addresses into a separate table, with fields for phys address, lat, long, and business name
--Background job to basically i'm-feeling-lucky all of the addresses that I dont have a business name for
--Ennumerate crimes that are dispatched, and break those out into a separate table with inbound call ('ASSIST/CITIZEN, MOTORIST') and prettified output ('Non-Emergency Assistance'). that would break my main DB down to just be a timestamp, a crime ID and an address ID.

Bloody
Mar 3, 2013

what are stored procedures and how do i learn more about databasing

power botton
Nov 2, 2011

normally i think normalization is way overboard for side projects the volume of crimes you are dealing with necessitates it in this case

power botton
Nov 2, 2011

Bloody posted:

what are stored procedures and how do i learn more about databasing

stored procedures are like methods for your database

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

i checked out a mysql book from the library and ordered that ~python for kids~ book because i'm literally a dumb babby.

i really need to come up with an interesting project to do now.

Shaggar
Apr 26, 2006

Bloody posted:

what are stored procedures and how do i learn more about databasing


stored procedures are a way to parameterize a query and store it in the database. this has the benefits of better security (since theres no direct object access), reusability, and abstraction (u can change what the proc does internally and as long as the inputs and outputs are the same ur code doesn't care).

it will also generally allow you to make better performing sql over an ORM cause most people will return gobs of crap they don't need when using an ORM and most people design procs to return only what you need.

Shaggar
Apr 26, 2006

git clone trooper posted:

normally i think normalization is way overboard for side projects the volume of crimes you are dealing with necessitates it in this case


always normalize your data cause theres never a reason not to.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Bloody posted:

what are stored procedures and how do i learn more about databasing

stored procedures are a way to add extra overhead and effort to writing and deploying your software in order to appease the DBA union and provide work for people who shell out five figures for oracle certification

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

~Coxy posted:

i'm also struggling to think of a time when an ORM has written some truly buggy as opposed to just plain old inefficient SQL

(i've only used LINQ to SQL, nHibernate and EF though)

if your orm can write inefficient sql get a database with a better query optimizer

sprocs and requiring a DBA's magic touch are the DBA guild trying to stop progress to further their employment

power botton
Nov 2, 2011

Shaggar posted:

always normalize your data cause theres never a reason not to.

anything client facing yes, most personal projects no

Shaggar
Apr 26, 2006
People who don't use stored procs don't care that their data sucks and their poo poo is slow.

uG
Apr 23, 2003

by Ralp
hey guys did you know crappy ORM practices perform worse than Ideal SQL practices????

Shaggar
Apr 26, 2006

git clone trooper posted:

anything client facing yes, most personal projects no

It's like maybe 5 extra minutes of thinking. Tbh I don't think I could design a non-normalized db w/out effort.

power botton
Nov 2, 2011

uG posted:

hey guys did you know ORMs perform worse than SQL????



yeah if you just want to pull up userid=2 then fine use an ORM but anything past that don't.

Shaggar
Apr 26, 2006

uG posted:

hey guys did you know crappy ORM practices perform worse than Ideal SQL practices????

Crappy orm practices are standard orm practices.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Shaggar posted:

It's like maybe 5 extra minutes of thinking. Tbh I don't think I could design a non-normalized db w/out effort.

effort is what you need to make a denormalized db, because unless you know what queries you're gonna run you'll denormalize it wrong

power botton
Nov 2, 2011

Shaggar posted:

It's like maybe 5 extra minutes of thinking. Tbh I don't think I could design a non-normalized db w/out effort.

if i have a csv of data that I'm trying to throw up into a website ASAP ill just .sqlite import mycsv and call it a day.

if I'm dealing with 10ks of rows ill normalize poo poo

uG
Apr 23, 2003

by Ralp
if you are using an ORM to pull poo poo like userid=10 you are an idiot

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

git clone trooper posted:

if i have a csv of data that I'm trying to throw up into a website ASAP ill just .sqlite import mycsv and call it a day.

if I'm dealing with 10ks of rows ill normalize poo poo

it's easiest to normalize it after you've imported it too

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

uG posted:

if you are using an ORM to pull poo poo like userid=10 you are an idiot

lol

User.find 10

SELECT * FROM users WHERE id = 10

yeah one of those is idiotic

uG
Apr 23, 2003

by Ralp
if thats all im doing im not gonna drag the ORM into the hell that is my source code

Bloody
Mar 3, 2013

what is normalization

Shaggar
Apr 26, 2006

Cocoa Crispies posted:

lol

User.find 10

SELECT * FROM users WHERE id = 10

yeah one of those is idiotic

they're both retarded cause user.find 10 is probably orming and writes the same sql

Adbot
ADBOT LOVES YOU

jooky
Jan 15, 2003

"orming"

  • Locked thread