|
Shaggar posted:I like joining collections I know you probably mean Join but the other day I did code:
|
# ? Aug 22, 2015 01:17 |
|
|
# ? May 23, 2024 12:29 |
|
Luigi Thirty posted:and now i've screwed up the atmega knocking the USB cable out while it was programming, now it won't reset or connect to my programmer anymore. welp do you have a JTAG device or some other bit-banger? you should be able to rescue your ATMega with something like a bus blaster or bus pirate or whatever
|
# ? Aug 22, 2015 01:19 |
|
MALE SHOEGAZE posted:nah, it's always functional
|
# ? Aug 22, 2015 01:29 |
|
Symbolic Butt posted:I'm actually not minding node for now node is okay until you realize a month from now it's probably going to be something completely different. that's all that pisses me off about it right now. i don't even care much about the cons arguments of i/o blocking or callback hell. that's JS. as for angular. learn typescript. it's cool. a controller: code:
|
# ? Aug 22, 2015 01:47 |
|
jony neuemonic posted:had a former employer do a mysql -> postgres port because mysql got so painful to use that suffering through a port was better than going forward with it. the only database ports I've ever really heard of in significant number have been SQLite → MySQL/PostgreSQL MySQL → PostgreSQL MySQL/PostgreSQL → MSSQL/DB2/Oracle and of course the Access/FileMaker/FoxPro → SQLite or anything that runs on a server comedy option too
|
# ? Aug 22, 2015 01:48 |
|
Vanadium posted:Also I bet we'll never migrate off either Delphi 5 or Interbase so all that stuff is completely academic. There's basically no way because there's like a dozen of us, sitting on a huge pile of code that seemingly only ever had stuff added to it in the past 20 years.. not even to RemObjects Oxygene? (that's their implementation and extension of Delphi that runs on the CLR and in native code)
|
# ? Aug 22, 2015 01:52 |
|
eschaton posted:the only database ports I've ever really heard of in significant number have been i've seen a lot of oracle to sql server too oracle to anything can be pretty brutal though, loving oracle joins everywhere
|
# ? Aug 22, 2015 01:56 |
|
sql server is the best
|
# ? Aug 22, 2015 01:58 |
|
i should use vs more than i presently do especially considering i can use it 100% of the time
|
# ? Aug 22, 2015 01:59 |
|
triple sulk posted:i should use vs more than i presently do especially considering i can use it 100% of the time vs + resharper is great
|
# ? Aug 22, 2015 01:59 |
|
Shaggar posted:sql server is the best imagine doing sqlite's insert or replace to sql server's merge
|
# ? Aug 22, 2015 02:02 |
|
ive never used SQLite. sql server merge works pretty well tho
|
# ? Aug 22, 2015 02:04 |
|
don't get me wrong sql server is what i use and like, but insert or replace is something that sql server could learn from.
|
# ? Aug 22, 2015 02:05 |
|
I should get work to buy me vs2015 and resharper
|
# ? Aug 22, 2015 02:32 |
|
eschaton posted:the only database ports I've ever really heard of in significant number have been Netezza → Vertica for OLAP
|
# ? Aug 22, 2015 03:06 |
|
Cold on a Cob posted:vs + resharper is great resharper is loving magical
|
# ? Aug 22, 2015 03:35 |
|
Bloody posted:I should get work to buy me vs2015 and resharper yes you should, but there's actually a free version of vs2015 if you work in a small business too
|
# ? Aug 22, 2015 05:55 |
|
Shaggar posted:step 1) use stored procs. all ur problems then go away. that's it. theres no more steps So cause I'm a dumb web developer whom cut their teeth on Django I've never really worked without an ORM or statement mapper, but writing stored procs for all data access sounds pretty appealing. That said though, what's the right way to go about managing that code base, I mean I assume the stored procs get written + updated during your schema updates, but are there documented approaches to organising it all when it gets to non-trivial sizes?
|
# ? Aug 22, 2015 07:02 |
|
~Coxy posted:I know you probably mean Join but the other day I did literal arrays implement IEnumerable, so you can just write elementVariables.Union({"intzone"}). I did something awful like that once, I wanted to concat through Aggregate but couldn't guarantee the collection wouldn't be empty code:
|
# ? Aug 22, 2015 07:35 |
|
Shaggar posted:ive never used SQLite. sql server merge works pretty well tho i like a lot of stuff about sql server but merge is probably the worst and most awkward of all upsert implementations
|
# ? Aug 22, 2015 07:37 |
|
Shaggar posted:sql server is the best otoh then you have to write pl/sql
|
# ? Aug 22, 2015 08:13 |
|
Maluco Marinero posted:So cause I'm a dumb web developer whom cut their teeth on Django I've never really worked without an ORM or statement mapper, but writing stored procs for all data access sounds pretty appealing. That said though, what's the right way to go about managing that code base, I mean I assume the stored procs get written + updated during your schema updates, but are there documented approaches to organising it all when it gets to non-trivial sizes? there are no good ways to do this (which is why having a lot of logic in SQL is bad) my current idea is to have one file per sproc/function/table and a script that runs them all in the right order. at least this way you can look at changelogs per file and diff them.
|
# ? Aug 22, 2015 08:24 |
|
Maluco Marinero posted:So cause I'm a dumb web developer whom cut their teeth on Django I've never really worked without an ORM or statement mapper, but writing stored procs for all data access sounds pretty appealing. That said though, what's the right way to go about managing that code base, I mean I assume the stored procs get written + updated during your schema updates, but are there documented approaches to organising it all when it gets to non-trivial sizes? that's a great question
|
# ? Aug 22, 2015 10:44 |
|
~Coxy posted:I know you probably mean Join but the other day I did I've added an extension method to object called .Yield() in my project, which does exactly what it sounds like and is perfect for situations like this
|
# ? Aug 22, 2015 11:17 |
|
NihilCredo posted:maybe you could start some project with SQLite? IIRC it's 99% standard SQL with only a few custom additions, like the pretty amusing likely() and unlikely() idk, sqlite seems to be a lot more liberal about what you can get up to in terms of subqueries, it feels way different than ~interbase~
|
# ? Aug 22, 2015 11:40 |
|
Maluco Marinero posted:So cause I'm a dumb web developer whom cut their teeth on Django I've never really worked without an ORM or statement mapper, but writing stored procs for all data access sounds pretty appealing. That said though, what's the right way to go about managing that code base, I mean I assume the stored procs get written + updated during your schema updates, but are there documented approaches to organising it all when it gets to non-trivial sizes? theres no really good way to do it, no. the problem is that Microsoft refuses to acknowledge the idea that the schema belongs to the database and not the application. this means there are no tools or extensions in sql server for doing schema versioning. you basically have to use external tools to manage schemas in source control and then make sure everyone puts their changes into source control after they enter them. its a lovely system but its the best you can do. I really wish they would add versioning directly to sql server so the server would version schema elements any time they're changed automatically. otherwise you're relying on your team to follow the process and that's always bad.
|
# ? Aug 22, 2015 15:14 |
|
Shaggar posted:theres no really good way to do it, no. the problem is that Microsoft refuses to acknowledge the idea that the schema belongs to the database and not the application. this means there are no tools or extensions in sql server for doing schema versioning. you basically have to use external tools to manage schemas in source control and then make sure everyone puts their changes into source control after they enter them. its a lovely system but its the best you can do. Why doesn't a SSDT project satisfy your requirements? If you're worried about coworkers manually editing the schema, you just don't give them the credentials to do so and instead set up a publish action in the CI process, so that the only way for them to alter the schema is to commit a change to the Sql project.
|
# ? Aug 22, 2015 17:49 |
|
NihilCredo posted:i like a lot of stuff about sql server but merge is probably the worst and most awkward of all upsert implementations i feel like merge should be a lot better than it is but it's still better than the hilarious "delete 2 million rows and insert new ones from stage in one transaction" approach one of our former devs used before i changed it
|
# ? Aug 22, 2015 17:57 |
|
NihilCredo posted:i like a lot of stuff about sql server but merge is probably the worst and most awkward of all upsert implementations postgres still doesn't have it at all sooooooo. (i think it's coming in 9.5).
|
# ? Aug 22, 2015 18:40 |
|
postgres is the poo poo
|
# ? Aug 22, 2015 18:42 |
|
it's good, but no upsert was a real pain. at least it's a non-issue pretty soon.
|
# ? Aug 22, 2015 18:51 |
|
it's one of those things that sqlite has and so i took it for granted, and now it turns out...
|
# ? Aug 22, 2015 19:07 |
|
Vanadium posted:it's one of those things that sqlite has and so i took it for granted, and now it turns out... even mysql has it
|
# ? Aug 22, 2015 23:21 |
|
NihilCredo posted:Why doesn't a SSDT project satisfy your requirements? If you're worried about coworkers manually editing the schema, you just don't give them the credentials to do so and instead set up a publish action in the CI process, so that the only way for them to alter the schema is to commit a change to the Sql project. We don't do per application databases because most of our applications exist to service the data model which is designed by the business. This means per application db projects don't work cause we don't have per application db objects. I've never actually tried importing the entire db schema into a project so maybe i'll give that a try. in general I've found it to be not as featured as sql management studio but maybe that's changed.
|
# ? Aug 23, 2015 04:02 |
|
the pitch NeXT used to make for EOF was that you should also be designing frameworks to interact with your data at a higher level, so that you can build applications faster than by putting all of the logic for all of the applications in the database
|
# ? Aug 23, 2015 05:03 |
|
for god's sake if you're going to go ahead with this "stored procedures as the API to your database" thing and have multiple apps connecting to the same database then please don't let any fuckheads write code in their apps that queries the tables raw. It seems pretty common for organizations to end up with databases that are unchangeable because some legacy apps contain magic query strings that hit tables directly
|
# ? Aug 23, 2015 06:55 |
|
Often it's better to write an API around the database and forbid applications from hitting the database directly. Need to query some new stuff? Come up with a sane way to add that info to the API. So basically stored procs, except handled by your own code instead of being tied up in the database. Another bonus is that you can relatively easily add authentication etc. to externalize it for client applications, third-party developers and so on.
|
# ? Aug 23, 2015 09:19 |
|
wrappers around databases are the best justification for microservice architectures
|
# ? Aug 23, 2015 09:27 |
|
Jabor posted:Often it's better to write an API around the database and forbid applications from hitting the database directly. Need to query some new stuff? Come up with a sane way to add that info to the API. After reading this it looks obviously correct, but I'm dumb so you're probably wrong
|
# ? Aug 23, 2015 09:51 |
|
|
# ? May 23, 2024 12:29 |
|
This is all hilarious to me because in our code base, the most random code hits the database to retrieve some obscure values, almost every utility function has a reference to the database somehow, etc. The size of that API around the database would be ridiculous.
|
# ? Aug 23, 2015 11:06 |