|
Zombywuf posted:I don't use memcached these days. Last time I did I used it as a db cache. Turns out the db didn't need caching and I should have told the people pestering me about caching to go gently caress themselves. All it did was add complexity and it could go for weeks with memcached down and no-one noticed, turns out my time was best spent making the db fast, which it was. This poo poo is endemic when semi-technical users tell you how to improve the performance of a system - it's always a x-y problem except there's no solution because poo poo can always be faster...
|
# ? Jun 22, 2012 20:54 |
|
|
# ? Jun 8, 2024 08:23 |
|
ErikTheRed: If I understand that correctly, the whole thing is equivalent to this oneliner, plus bugs.code:
|
# ? Jun 22, 2012 20:59 |
|
Zombywuf posted:I don't use memcached these days. Last time I did I used it as a db cache. Turns out the db didn't need caching and I should have told the people pestering me about caching to go gently caress themselves. All it did was add complexity and it could go for weeks with memcached down and no-one noticed, turns out my time was best spent making the db fast, which it was. Yeah, I really cannot understand why people think "boy, my DB is slow" and think "I better throw some more software at this!" If your database is really bumping up against CPU/memory constraints, it's far cheaper to throw hardware at the problem than it is to pay a programmer to think about how to properly add database-level caching. And if it's not you're probably doing something stupid.
|
# ? Jun 22, 2012 21:09 |
|
ErikTheRed posted:Oh man, I don't even know what to say here The best part is the Hungarian notation not for types or for usage, but for loving scope. lLocal and pParameter is just so loving absurd. E: tables
|
# ? Jun 22, 2012 21:50 |
|
Zombywuf posted:You're quite right, the data storage *does* make a difference. Tell me, how do you implement a star schema in Redis? Normalise HBase for data size minimisation? Cluster data in Cassandra to maximise temporal and cache locality? Organise data access patterns in memcache to minimise contention while maintaining some degree of transactional integrity? You don't need to do those things with those tools because you have matched tasks with the wrong tools.
|
# ? Jun 22, 2012 22:51 |
|
tef posted:I'd wager that ruby is easier to pick up for php developers than python, or perhaps, ruby is easier to write php in than python is - python has immutable strings, explicit self, an explicit unicode type, and semantic whitespace. You think semantic whitespace makes python harder to write? I just started learning it, and I vastly prefer ruby because of its lisp roots (which are much more noticeable, by contrast, than I thought they would be), but I really do like the semantic whitespace. raminasi fucked around with this message at 23:34 on Jun 22, 2012 |
# ? Jun 22, 2012 23:17 |
|
GrumpyDoctor posted:You think semantic whitespace makes python harder to write? I just started learning it, and I vastly prefer ruby because of it's lisp roots (which are much more noticeable, by contrast, than I thought they would be), but I really do like the semantic whitespace. I didn't much like semantic whitespace when I started Python (and it still irks me a little bit) but it at least makes it a great language for instructors - the code needs to be readable to compile.
|
# ? Jun 22, 2012 23:19 |
|
crazyfish posted:I didn't much like semantic whitespace when I started Python (and it still irks me a little bit) but it at least makes it a great language for instructors - the code needs to be readable to compile. EDIT: To be clear, I'm talking about something like this. Python code:
PrBacterio fucked around with this message at 23:35 on Jun 22, 2012 |
# ? Jun 22, 2012 23:29 |
|
GrumpyDoctor posted:You think semantic whitespace makes python harder to write? It doesn't make it harder to learn, it's more of an obstacle to whiny programmers.
|
# ? Jun 22, 2012 23:35 |
|
PrBacterio posted:What I don't like about semantic whitespace is the lack of an (unindented) end-of-block token on its own line, separating the indented block from the code that follow. When I have control structures nested to a level of several indentations deeper than the surrounding code, having code on the next line just suddenly going back to having more than one level fewer of indentation can be kind of annoying imho. FWIW, most (all?) of the favored Python editors have whatever you call those vertical line thingies that show the level of indentation you're at.
|
# ? Jun 22, 2012 23:37 |
|
Golbez posted:Uh. Here is the prototype for that function: Silly Golbez, type hinting isn't for primitives! Just because the prototype has hinting in the documentation, that doesn't actually mean anything - type hinting in PHP only works on objects, and doesn't cast anything; only crashes if the wrong type of object was supplied.
|
# ? Jun 22, 2012 23:40 |
|
PrBacterio posted:What I don't like about semantic whitespace is the lack of an (unindented) end-of-block token on its own line, separating the indented block from the code that follow. When I have control structures nested to a level of several indentations deeper than the surrounding code, having code on the next line just suddenly going back to having more than one level fewer of indentation can be kind of annoying imho. If it's hard to read, don't write it that way. If it's because you have too many locals to refactor it correctly, you should encapsulate stuff in a class or something and quit fetishizing primitives.
|
# ? Jun 22, 2012 23:40 |
|
BonzoESC posted:You don't need to do those things with those tools because you have matched tasks with the wrong tools. I've yet to find a good example of a task that fits those tools.
|
# ? Jun 23, 2012 00:01 |
|
Zombywuf posted:I've yet to find a good example of a task that fits those tools. Come on man, you're basically saying all the engineering staff at Twitter and Facebook are idiots.
|
# ? Jun 23, 2012 00:16 |
|
Facebook gave up on Cassandra, they don't use it. They use innoDB from MySQL with lots of rules like "no joins" that amount to making it a sharded key-value store.
|
# ? Jun 23, 2012 00:27 |
|
JewKiller 3000 posted:Facebook gave up on Cassandra, they don't use it. They use innoDB from MySQL with lots of rules like "no joins" that amount to making it a sharded key-value store. They didn't give up on Cassandra for MySQL, though - they moved Messages over to hBase, if I recall because Cassandra's eventual consistency wasn't cutting it after they integrated chat and messages into the same product. I do believe Reddit uses Cassandra, if that means anything. trex eaterofcadrs posted:Come on man, you're basically saying all the engineering staff at Twitter and Facebook are idiots. PrBacterio posted:What I don't like about semantic whitespace is the lack of an (unindented) end-of-block token on its own line, separating the indented block from the code that follow. When I have control structures nested to a level of several indentations deeper than the surrounding code, having code on the next line just suddenly going back to having more than one level fewer of indentation can be kind of annoying imho. Doctor w-rw-rw- fucked around with this message at 06:32 on Jun 23, 2012 |
# ? Jun 23, 2012 00:36 |
|
This thread needs to be in its own forum with noindex and nofollow and a robots.txt
|
# ? Jun 23, 2012 01:21 |
|
revmoo posted:This thread needs to be in its own forum with noindex and nofollow and a robots.txt Why? Are you finding it on google?
|
# ? Jun 23, 2012 01:45 |
|
Nope I'm just saying people might participate a bit more.
|
# ? Jun 23, 2012 02:24 |
|
"Private programmers poo poo-bagging employers' code bases and other co-workers chat" Just rolls off the tongue.
|
# ? Jun 23, 2012 03:02 |
|
PrBacterio posted:What I don't like about semantic whitespace is the lack of an (unindented) end-of-block token on its own line, separating the indented block from the code that follow. When I have control structures nested to a level of several indentations deeper than the surrounding code, having code on the next line just suddenly going back to having more than one level fewer of indentation can be kind of annoying imho. You could just add # comments where indentation goes back more than one level, as a visual aid. Or use an editor that highlights that stuff for you, as others have said.
|
# ? Jun 23, 2012 04:36 |
|
trex eaterofcadrs posted:Come on man, you're basically saying all the engineering staff at Twitter and Facebook are idiots. Are you suggesting that they aren't? edit: revmoo posted:This thread needs to be in its own forum with noindex and nofollow and a robots.txt Just move it to FYAD. Only logged-in users will be able to see it, and we can post the goatman to our hearts' content. It's a win-win situation. that awful man fucked around with this message at 08:26 on Jun 23, 2012 |
# ? Jun 23, 2012 08:22 |
|
I vote for TCC.
|
# ? Jun 23, 2012 12:35 |
|
Doctor w-rw-rw- posted:I do believe Reddit uses Cassandra, if that means anything. quote:Relational databases are holy swiss-army knives that can do everything, didn't you know? Why use two tools that do something specific well, when you can configure one good enough for both use cases? Inconceivable! I'm also really itching for an excuse to use Riak.
|
# ? Jun 23, 2012 13:14 |
|
This is almost a parody; it's like if the Keyston Kops were developers. "This is a config error," "this is fake," "this is a bug," "this is fixed," "it's back," "it's gone"Look Around You posted:The best part is the Hungarian notation not for types or for usage, but for loving scope. lLocal and pParameter is just so loving absurd.
|
# ? Jun 23, 2012 16:21 |
|
Zombywuf posted:I'm also really itching for an excuse to use Riak. Me too
|
# ? Jun 23, 2012 16:22 |
|
C#, ASP.Net MVC with the Razor engine, and Entity Framework 4 kick rear end. Also the nuget package support gives you a very fink/macports/package manager type of interface to automatically pull dependencies in. Also the EntityFramework power tools rock - right-click, reverse engineer classes, and boom it spits out POD objects corresponding to your existing database. Never write explicit data access code again, but with LINQ you can still create query expressions functionally that get translated into joins and the like under the hood. C# is a great language to learn - with the lambdas and LINQ, dynamic support, delegates (function pointers), type inference, async/await, etc it has far surpassed Java and will give you a good stepping stone to the other C languages if you ever want to move that way. Plus learning a new platform will break all those assumptions you have in your brain that come from always working on Unix, or Apache, or in dynamic languages, etc. Until you step into something completely different you won't realize how limited you were.
|
# ? Jun 24, 2012 02:51 |
|
php:<? foreach ( $_POST as $k1 => $v1 ) $$k1 = $v1; foreach ( $_GET as $k1 => $v1 ) $$k1 = $v1; ?>
|
# ? Jun 25, 2012 07:37 |
|
bobthecheese posted:
This gif from the Political Cartoons thread sumarized my feelings towards that festering shitnugget. The best way to deal with this sort of thing is to help them figure out why it is wrong, instead of attempting to correct them based on authority alone.
|
# ? Jun 25, 2012 07:46 |
|
bobthecheese posted:
How do these people even learn to code jeez. "Oh look let's just allow any variable to be controlled by the user! I have no idea how this can go wrong "
|
# ? Jun 25, 2012 07:49 |
|
bobthecheese posted:
How is register_globals a massive security flaw? Did someone think that values from $_POST were more secure than those from $_GET?
|
# ? Jun 25, 2012 07:50 |
|
Sinestro posted:
Create a git precommit hook that shows this gif if it finds variable variables ($$) in the commit file.
|
# ? Jun 25, 2012 07:51 |
|
Suspicious Dish posted:How is register_globals a massive security flaw? Did someone think that values from $_POST were more secure than those from $_GET? No, that's not the point (and in fact, GET variables override POST variables). The point is that allowing variables to be set freely by the user is going to gently caress poo poo up.
|
# ? Jun 25, 2012 07:55 |
|
bobthecheese posted:Silly Golbez, type hinting isn't for primitives! Just because the prototype has hinting in the documentation, that doesn't actually mean anything - type hinting in PHP only works on objects, and doesn't cast anything; only crashes if the wrong type of object was supplied. But it does cast! When you give it a numeric string, it will cast that to a float when running the function, right? So why doesn't ... I mean, it ...
|
# ? Jun 25, 2012 08:03 |
|
KaneTW posted:No, that's not the point (and in fact, GET variables override POST variables). The point is that allowing variables to be set freely by the user is going to gently caress poo poo up. I'm confused how, though. I do know that GET variables override POST variables, but I'm not sure why that matters at all. They're done as the first thing by the interpreter - any page script that uses variables initializes them first, right?
|
# ? Jun 25, 2012 08:33 |
|
Strong Sauce posted:Create a git precommit hook that shows this gif if it finds variable variables ($$) in the commit file. PHP code:
|
# ? Jun 25, 2012 08:36 |
|
Suspicious Dish posted:...any page script that uses variables initializes them first, right? That is what _should_ happen, but you can't rely on it. If you use an uninitialised variable, it generates a "notice" level error and PHP treats it as having the value null.
|
# ? Jun 25, 2012 08:38 |
|
Oh, right. You can disable global notices at runtime with a function call. Thanks, PHP.
|
# ? Jun 25, 2012 08:48 |
|
Strong Sauce posted:Create a git precommit hook that shows this gif if it finds variable variables ($$) in the commit file. Doesn't go far enough. Pushing $$ to production should be a fireable offense.
|
# ? Jun 25, 2012 09:05 |
|
|
# ? Jun 8, 2024 08:23 |
|
Strong Sauce posted:Create a git precommit hook that shows this gif if it finds variable variables ($$) in the commit file. PHP code:
|
# ? Jun 25, 2012 09:09 |