|
rjmccall posted:I love this. Yes, the problem people have with this code must be that they dislike concise and expressive notations. Have you considered learning GolfScript, or APL (and derivatives)? quote:tl;dr: In a better-designed language, this would be: a better designed language wouldn't have the use case of 'all project euler problems should be one-liners'
|
| # ¿ May 6, 2012 10:10 |
|
|
| # ¿ May 24, 2013 04:40 |
|
Zombywuf posted:1) Block ads, problem solved Hey this is the coding horrors thread not the judgemental programmers thread.
|
| # ¿ May 6, 2012 16:57 |
|
yaoi prophet posted:Look, I just want to know why we've been writing text using the same 26 letters for hundreds of years. Isn't it time we started using something more English 2.0? there are more than 26 letters (in english) if you are pedantic and see carolingian minuscule and latin as different scripts
|
| # ¿ May 10, 2012 01:17 |
|
Golbez posted:** Most people simply go for /[^A-Za-z ]/, without realizing the single space part of the instructions. unicode Otto Skorzeny posted:
tef fucked around with this message at May 10, 2012 around 21:50 |
| # ¿ May 10, 2012 21:44 |
|
ToxicFrog posted:What happened to your old avatar? I liked that one. So did I Some ie9 user got butthurt that my avatar crashes/slows down their browser
|
| # ¿ May 10, 2012 23:04 |
|
Zamujasa posted:Ugh, I know. I've tried linking this (as well as things like evidence-based estimating/scheduling) but it does not help at all. They have no idea how programming works. Try linking it twice so he can read it twice as fast
|
| # ¿ May 14, 2012 17:09 |
|
If only there were ascii characters for this very purpose
|
| # ¿ May 18, 2012 15:06 |
|
BP posted:The application I develop for uses a non-SQL hierarchical DB, upon which we've added the abstraction of records with fields. Aaaaaaaaaaaaaaa. aaaaaa.
|
| # ¿ May 23, 2012 16:05 |
|
I can't wait for 'how secure is my credit card number'
|
| # ¿ May 23, 2012 18:01 |
|
Good luck when VISA find them. They're less tolerant of parody than the olympics. (mycreditcarddetails.co.uk got shafted)
|
| # ¿ May 24, 2012 01:41 |
|
Internet Janitor posted:There's also https://github.com/aseemk/json5 give it time, someone will make json with schemas and namespaces
|
| # ¿ May 28, 2012 21:23 |
|
(I know of these being added json is pretty much the "gently caress it, we'll do it live" of serialisation formats
|
| # ¿ May 29, 2012 11:42 |
|
Hammerite posted:I disagree. There is no reason why a table should not use strings as its primary key. ![]() Performance. edit: Although I guess that doesn't matter with MySQL
|
| # ¿ Jun 11, 2012 23:08 |
|
Hammerite posted:I don't think the presumption should be that using a string as a primary key is a bad idea, Frankly, beyond percussive maintenance, I am unsure how to transmit this information to you. Hammerite posted:so I don't think the onus is on me to show that it actually isn't. 'I don't understand why it is bad so it isn't my job to try' Unfortunately, the onus isn't on us to explain why this is a BadIdea™. Hammerite posted:What requirements are there of a primary key? By definition, it is meant to uniquely identify rows in the table. To that, you and Zombywuf would both add (unless I misunderstand you) that the primary key should be meaningless. (And I would agree that in the great majority of cases it should be meaningless, I just don't join you is saying that it must 100% of the time be meaningless.) Artisan primary keys. Hammerite posted:Handy if you want to use UTF-8 to support internationalisation, but also want to use ASCII text for some key columns used internally I know you brought this up earlier, but UTF-8 is an extension of ASCII You don't need to use two different encodings here, just use UTF-8 everywhere.tef fucked around with this message at Jun 13, 2012 around 09:34 |
| # ¿ Jun 13, 2012 09:30 |
|
KaneTW posted:This thread is becoming a horror in itself, again. This will never stop happening.
|
| # ¿ Jun 13, 2012 09:57 |
|
Hammerite posted:I asked for a comparison that was (among other things) unbiased. I didn't ask for a scattering of snide comments about how this or that totally sucks in MySQL, hurr hurr. Notice how McGlockenshire was critical of MySQL but I didn't jump on anything he said. if you want to have sql explained to you, you could perhaps start somewhere other than the coding horrors thread.
|
| # ¿ Jun 14, 2012 02:17 |
|
ymgve posted:I wasn't thinking about code snippets, but more larger projects which are cleanly organized and relatively easy to understand. I tend to find code beautiful in theory and rarely in practice. Code can only be as beautiful as the problem it solves, and most of the problems we face are ugly.
|
| # ¿ Jun 16, 2012 02:59 |
|
Plorkyeran posted:That could be pretty interesting, actually. Isn't that the screenshot thread
|
| # ¿ Jun 16, 2012 03:00 |
|
DaTroof posted:That's why I was tempted to cite jQuery as an example of good code, even though the code itself isn't beautiful. It provides an elegant interface that solves difficult problems, which is often way more important than the underlying implementation. I think my favourite piece of code is this polyglot quine code:
|
| # ¿ Jun 16, 2012 14:40 |
|
Find a new job, it will be quicker than teaching your boss how to do his.
|
| # ¿ Jun 18, 2012 16:59 |
|
Groke posted:Ahaha. Is it MUMPS?
|
| # ¿ Jun 19, 2012 11:45 |
|
Suspicious Dish posted:I'm curious how people feel about the goto statement as an approach to this.
|
| # ¿ Jun 20, 2012 18:45 |
|
https://bugs.php.net/bug.php?id=60758
|
| # ¿ Jun 22, 2012 13:05 |
|
Zombywuf posted:Memcached is a HTML template cache node. Actually memcache was written because mysql couldn't cache queries well.
|
| # ¿ Jun 22, 2012 18:22 |
|
Look Around You posted:You pretty much can't go wrong with Ruby or Python. They both have large frameworks that they're known for (Rails for Ruby, Django for Python) and lighter frameworks for more flexible development (Sinatra for Ruby, Flask and Pyramid for Python). 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. quote:As for the differences between the languages... Ruby is very good at writing DSLs and gives you a lot of opportunity for "natural" looking language extensions. It's big on giving you a lot of ways to do things (which is a key part of its philosophy, taken from Perl). To be obsequious, ruby reminds me of a lisp-2 with a smalltalk semantics and perl syntax quote:One more thing about Python: there's two main versions, Python 2 and Python 3. Python 2 is still the most commonly used version as python 3 introduced some backwards incompatible changes and not all libraries have updated to py3 yet. Ruby similarly has some issues between 1.8 and 1.9 with the introduction of unicode handling.
|
| # ¿ Jun 22, 2012 18:39 |
|
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 22:35 |
|
Zombywuf posted:I'm also really itching for an excuse to use Riak. Me too
|
| # ¿ Jun 23, 2012 15:22 |
|
Thermopyle posted:There's a huge problem in science right now where it's extremely difficult to replicate others work because code isn't available or the exact environment the code was used in isn't documented well. “In the good old days physicists repeated each other's experiments, just to be sure. Today they stick to FORTRAN, so that they can share each other's programs, bugs included.”
|
| # ¿ Jul 2, 2012 17:33 |
|
Sometimes the return value changes between versions for those error cases https://bugs.php.net/bug.php?id=50696
|
| # ¿ Jul 5, 2012 17:45 |
|
qntm posted:...and str_replace() doesn't. code:
|
| # ¿ Jul 5, 2012 17:52 |
|
Aleksei Vasiliev posted:what the gently caress, this is a feature? Isn't this 100% normal for any OO language? Why wasn't it available as soon as objects were? Same reason foo(1,2,3)[0] was a syntax error until recently. the grammar is a mess.
|
| # ¿ Jul 6, 2012 17:41 |
|
str.encode([encoding[, errors]]) Return an encoded version of the string. Default encoding is the current default string encoding. errors may be given to set a different error handling scheme. The default for errors is 'strict', meaning that encoding errors raise a UnicodeError. Other possible values are 'ignore', 'replace', 'xmlcharrefreplace', 'backslashreplace' and any other name registered via codecs.register_error(), see section Codec Base Classes. For a list of possible encodings, see section Standard Encodings. New in version 2.0. Changed in version 2.3: Support for 'xmlcharrefreplace' and 'backslashreplace' and other error handling schemes added. Changed in version 2.7: Support for keyword arguments added. is this coding horrors or zombywuf is too lazy to read the docs horrors
|
| # ¿ Jul 20, 2012 16:47 |
|
Zamujasa posted:Reminds me of my last job where I'd see code that was literally just "1;", as if it did something. It does something in perl: http://stackoverflow.com/questions/...ch-perl-package
|
| # ¿ Jul 23, 2012 18:10 |
|
Frozen-Solid posted:PHP6 got dropped, and they decided instead of making a full version update, to roll the "featured" changes PHP6 was going to have into smaller portions. PHP6 basically became PHP 5.3 and 5.4. There are still a few features that have been discussed and planned for 6 that we haven't seen yet though. PHP6 tried to add unicode, and strayed from the true path of UTF-8, and suffered as a result. Unicode support is still missing from PHP.
|
| # ¿ Jul 27, 2012 20:10 |
|
it's a bad thing
|
| # ¿ Aug 10, 2012 09:08 |
|
http://blog.serverdensity.com/remov...e-its-too-slow/quote:Throttling: the performance impact of the global lock in MongoDB 1.8 was such that we couldn’t insert our monitoring postback data directly into MongoDB – it had to be inserted into Memcached first then throttled into MongoDB via a few processor daemons (as opposed to larger numbers of web clients). Using memcache (a cache of all things) as a write queue for mongo db.
|
| # ¿ Aug 20, 2012 00:21 |
|
Zombywuf posted:*writes sql query* If we're honest, it's more like: Writes Sql Query, Watches it turn into series of streams, cached operations etc, Rewrites Sql Query after inspecting the query plan, tries again. Laughs at nosql people writing what they want directly rather than second guessing a non deterministic query planner.
|
| # ¿ Aug 20, 2012 12:09 |
|
Postgres 9.2 introduces index only scans http://wiki.postgresql.org/wiki/Wha...ndex-only_scans
|
| # ¿ Aug 20, 2012 15:49 |
|
Doctor w-rw-rw- posted:You redirect logging to a file? Not syslog? /dev/log
|
| # ¿ Aug 21, 2012 18:04 |
|
|
| # ¿ May 24, 2013 04:40 |
|
code:
|
| # ¿ Sep 4, 2012 14:01 |





