|
someone has to write abstractions over academic poo poo for the retards!
|
# ? Jul 25, 2013 00:01 |
|
|
# ? Jun 3, 2024 23:50 |
|
chumpchous posted:i don't see how cucumber adds anything to this process over spec or rspec or whatever. in rspec it would just be
|
# ? Jul 25, 2013 00:14 |
|
uG posted:someone has to write abstractions over academic poo poo for the retards! or make the academic poo poo less abstracted either way PhDs with 0 industry experience aren't the best at designing usable PLs, who knew
|
# ? Jul 25, 2013 00:16 |
|
haskell is some weird awful academic poo poo for idiots, linq is the greatest thing ever. microsoft academia -> spectacular language feature
|
# ? Jul 25, 2013 01:06 |
|
what's the advantage of linq other than making it look more like a raw query, which at that point why are you not just doing a raw query
|
# ? Jul 25, 2013 01:12 |
|
Cocoa Crispies posted:rspec has too much syntax, it feels too much like programming i like programming
|
# ? Jul 25, 2013 01:13 |
|
MeruFM posted:what's the advantage of linq other than making it look more like a raw query, which at that point why are you not just doing a raw query linq isn't just for sql.
|
# ? Jul 25, 2013 01:14 |
|
MeruFM posted:what's the advantage of linq other than making it look more like a raw query, which at that point why are you not just doing a raw query off the top of my head... code completion, syntax checking in the gui, you can do linq against enumerables
|
# ? Jul 25, 2013 01:15 |
|
we're fighting this in another thread but if you're using an orm like the entity framework or linq to sql garbage extensively you've done hosed up somewhere
|
# ? Jul 25, 2013 01:16 |
|
there's a part of me that has the dream job of working at microsoft research but the rest of me ridicules that part a lot
|
# ? Jul 25, 2013 04:05 |
|
tef posted:if you have process isolation, option types, then checked exceptions don't seem that neat or useful, and btw, you can do nice things with option types. for the home audience: process isolation == a fancy word for good old crash & lose work & restart & hope it stops crashing brand of "error handling" option types == the idea that error handling becomes easy if you squint so hard that all errors start looking like NullPointerExceptions
|
# ? Jul 25, 2013 04:30 |
|
Max Facetime posted:for the home audience: I'm sorry, sir, but yospos is a troll-free forum. please keep it that way !!!
|
# ? Jul 25, 2013 05:22 |
|
Jerry SanDisky posted:movable and existing before c++14 were its selling points, its super easy to implement one oh i thought you had done something where you figured out how to make it have a sizeof(T) instead of sizeof(T + 1), like every other c++ implementation of option<T>
|
# ? Jul 25, 2013 05:27 |
|
SAHChandler posted:oh i thought you had done something where you figured out how to make it have a sizeof(T) instead of sizeof(T + 1), like every other c++ implementation of option<T> This is not possible
|
# ? Jul 25, 2013 08:24 |
|
Bizarro Buddha posted:This is not possible
|
# ? Jul 25, 2013 09:50 |
|
git clone trooper posted:we're fighting this in another thread but if you're using an orm like the entity framework or linq to sql garbage extensively you've done hosed up somewhere Consider your sources. git clone trooper posted:linq isn't just for sql. Exactly. Linq is the best because Composition. Encapsulate logic in extension methods from IQueryable -> IQueryable. Compose like crazy in new and interesting ways. Test easily against in-memory structures. Use Linq to Sql and get completely predictable db queries that are appropriate for 95% of the garbage you'll ever write. Use rx.net and compose event logic. Use a similar syntax to compose async computations with Task. Or, you know, write new stored proc every time you want to do something and handle your own dirty object tracking, whatever.
|
# ? Jul 25, 2013 16:06 |
|
linq sucks for sql. its no different from writing out a prepared statement in code. its crap for idiots who write bad programs. also dirty objects are a concept unique to the terrible persistence model which should never be used outside of prototyping or in memory temporary stores.
|
# ? Jul 25, 2013 16:12 |
|
havelock posted:Or, you know, write new stored proc every time you want to do something and handle your own dirty object tracking, whatever. unironically this. except make a lil activerecord-type class that does orm-type stuff for you, but lets you override everything when you need to get tricky
|
# ? Jul 25, 2013 16:13 |
|
havelock posted:Consider your sources.
|
# ? Jul 25, 2013 16:28 |
|
Tiny Bug Child posted:unironically this. except make a lil activerecord-type class that does orm-type stuff for you, but lets you override everything when you need to get tricky sounds like the orm i use
|
# ? Jul 25, 2013 16:29 |
|
Shaggar posted:linq sucks for sql. its no different from writing out a prepared statement in code. its crap for idiots who write bad programs. you can tell because it's in a j-language
|
# ? Jul 25, 2013 16:30 |
|
yes let me just handwrite some artisanal sql for this web app that will service dozens of users per day because the hypothetical performance increase vs using some canned orm is definitely worth the additional hours of development and frustration when nothing works and then when it does work it works terribly this seems like a worthwhile way to spend time
|
# ? Jul 25, 2013 16:34 |
|
nah, linq is some p-lang academic poo poo trying to be forced into a proper language
|
# ? Jul 25, 2013 16:35 |
|
linq is the only reason to use c#
|
# ? Jul 25, 2013 16:35 |
|
Bloody posted:yes let me just handwrite some artisanal sql for this web app that will service dozens of users per day because the hypothetical performance increase vs using some canned orm is definitely worth the additional hours of development and frustration when nothing works and then when it does work it works terribly this seems like a worthwhile way to spend time yeah if it doesn't matter an orm is fine.
|
# ? Jul 25, 2013 16:35 |
|
havelock posted:Exactly. Linq is the best because Composition. Encapsulate logic in extension methods from IQueryable -> IQueryable. Compose like crazy in new and interesting ways. Test easily against in-memory structures. Use Linq to Sql and get completely predictable db queries that are appropriate for 95% of the garbage you'll ever write. Use rx.net and compose event logic. Use a similar syntax to compose async computations with Task. i've heard that linq can be punishing performance-wise because sometimes you'll wind up calling methods way more than you would have if you'd just used a plain old loop
|
# ? Jul 25, 2013 16:37 |
|
prefect posted:i've heard that linq can be punishing performance-wise because sometimes you'll wind up calling methods way more than you would have if you'd just used a plain old loop that's because j-languages only way to do polymorphism is at runtime with interfaces and poo poo which is completely ridiculous for things like linq a c++ implementation of linq would own, except that everyone is too lazy to do it
|
# ? Jul 25, 2013 16:43 |
|
prefect posted:i've heard that linq can be punishing performance-wise because sometimes you'll wind up calling methods way more than you would have if you'd just used a plain old loop In the general case, no it's basically the same. If you're working solely on memory objects (vs linq to sql) the source is lazily enumerated and all the transforms applied per element so you only iterate over the source once (.Where(blah).Select(blah) doesn't do one loop for the filter and another for the project). You can occasionally get into trouble with complex query formulations where the source ends up being traversed multiple times - it's basically the equivalent of a SELECT N+1. There are two perspectives on this: 1. who cares? (O(N) is close enough to O(N*N) for most values of in memory N you're likely to deal with), 2. you can identify these cases and put a .ToList in your query chain to force evaluation and prevent multiple iteration. In summary, there's a very small performance cost in the general case, a predicate degradation in a few cases with a simple work around that doesn't compromise clarity, and it's vastly easier to read and write than the equivalent loops with accumulator data structures. What's not to like? If you really care about a few cycles here and there you are either wrong to care or using the wrong language/framework/run time. havelock fucked around with this message at 16:50 on Jul 25, 2013 |
# ? Jul 25, 2013 16:48 |
|
Zlodo posted:a c++ implementation of linq would own, except that everyone is too lazy to do it there are other issues
|
# ? Jul 25, 2013 16:49 |
|
FamDav posted:there are other issues such as 'using c++'
|
# ? Jul 25, 2013 16:50 |
|
havelock posted:You can occasionally get into trouble with complex query formulations where the source ends up being traversed multiple times - it's basically the equivalent of a SELECT N+1. There are two perspectives on this: 1. who cares? (O(N) is close enough to O(N*N) for most values of in memory N you're likely to deal with), 2. you can identify these cases and put a .ToList in your query chain to force evaluation and prevent multiple iteration. i'm not arguing; i just know that my last company had a bot that grepped the source for linq expressions because a bunch of developers had done some terrible things with them
|
# ? Jul 25, 2013 16:57 |
|
Tiny Bug Child posted:unironically this. except make a lil activerecord-type class that does orm-type stuff for you, but lets you override everything when you need to get tricky so, activerecord
|
# ? Jul 25, 2013 17:07 |
|
if you cant understand your linq just by glancing at it its probably bad.
|
# ? Jul 25, 2013 17:08 |
|
prefect posted:i've heard that linq can be punishing performance-wise because sometimes you'll wind up calling methods way more than you would have if you'd just used a plain old loop yeah that sucks when the stackoverflow code i copied and don't understand isn't done well
|
# ? Jul 25, 2013 18:16 |
|
havelock posted:Or, you know, write new stored proc every time you want to do something and handle your own dirty object tracking, whatever. as someone who has dealt with databases with billions of rows of data each table... but if you're making a shitheel little app that one person will use for a few hundred records, do whatever you want. Shaggar posted:yeah if it doesn't matter an orm is fine.
|
# ? Jul 25, 2013 18:19 |
|
git clone trooper posted:yeah that sucks when the stackoverflow code i copied and don't understand isn't done well no, this was the result of resharper (i think) offering to convert loops into linq expressions, and developers going along with it blindly (in my own limited experience, it's tough to say "no" to resharper suggestions -- those guys are super-smart, so they must know better than i do)
|
# ? Jul 25, 2013 18:20 |
|
like when jquery idiots chain tons of functions and selectors and turns out they're doing things a millions times over
|
# ? Jul 25, 2013 18:21 |
|
git clone trooper posted:as someone who has dealt with databases with billions of rows of data each table... Why do you have billions of rows in your transactional tables? But yeah - my point is that most everyone is writing stupid garbage even though they think they aren't. 500k records? who cares? 1 million records with reasonable indexes? who cares? It's worth those few extra milliseconds to end up with a codebase that can actually be read and maintained.
|
# ? Jul 25, 2013 18:26 |
|
i'm writing a regular application of the .exe kind with a sqlite db and it really sucks when you click something and it lags because the shitsql was not written right it's funny, being on the internet for so long makes you immune to something that's actually really horrible
|
# ? Jul 25, 2013 18:28 |
|
|
# ? Jun 3, 2024 23:50 |
|
stored procs are way easier to understand and maintain once you get above a handful of tables.
|
# ? Jul 25, 2013 18:28 |