|
feedmegin posted:That's not a language thing, that's a 'my compiler is poo poo at reporting errors' thing. The language in no way mandates bad error reporting.
|
# ? Apr 10, 2014 21:30 |
|
|
# ? Jun 8, 2024 07:05 |
|
This cache talk reminds me of the time I was looking into a complaint that our website would sometimes take a really long time to serve up pages, for no good reason. A profiler showed that once an hour, the site would go insane and start hitting the database like crazy for a few minutes. It turns out that the a "senior" developer had written his own caching implementation instead of using the built-in ASP .NET caching system. Every hour, it would just totally clear itself, regardless of how stale the data was, or how stale the data could reasonably get without it being useless. This led to fun things like users customers placing orders for things that were out of stock and being told it would ship within 48 hours, because the cached data showed that we still had plenty of those in stock and could fulfill the request that day. When asked why, he had no explanation, but insisted that we not use the ASP .NET cache. New Yorp New Yorp fucked around with this message at 21:37 on Apr 10, 2014 |
# ? Apr 10, 2014 21:34 |
|
I met my first foreach switch today, I shed a silent tear. The collection it iterated over was hardcoded and never altered. Honestly thought I'd never see this for real.code:
|
# ? Apr 10, 2014 21:37 |
|
Ithaqua posted:This cache talk reminds me of the time I was looking into a complaint that our website would sometimes take a really long time to serve up pages, for no good reason. A profiler showed that once an hour, the site would go insane and start hitting the database like crazy for a few minutes. I think this one wins the cache discussion. Ouch. Plorkyeran posted:I've encountered a lot of caches that don't actually make anything faster. Common reasons include terrible cache implementations that take as long to look up things as looking them up in the database, caching things that take less time to compute from scratch each time than to cache, the cache getting invalidated too frequently to be of any real use, having to spend enough time ensuring the cache gets invalidated when needed that it ends up outweighing the speed gains, bad LRU implementations that slow down as the cache gets bigger and so appear great in tiny benchmarks but suck in real usage, and just plain never actually reading stuff from the cache. This is why nobody should home-roll a cache system... use one of the many excellent options (memcache, redis, varnish, ElastiCache [which is basically memcache anyway]), granted that doesn't solve the invalidation issue but it's much easier to solve that with a battle tested system than your own dumb poo poo.
|
# ? Apr 10, 2014 21:43 |
|
Dirty Frank posted:I met my first foreach switch today, I shed a silent tear. The collection it iterated over was hardcoded and never altered. Honestly thought I'd never see this for real. More common than you think. Awfully sorry to break it to you.
|
# ? Apr 10, 2014 21:50 |
|
Zombywuf posted:Give it up, ADA is never going to be a thing outside the defence industry. Even there it's loosing ground: https://en.wikipedia.org/wiki/Lockh...35_Lightning_II http://www.reuters.com/article/2012/03/30/lockheed-fighter-idUSL2E8EU8C420120330 http://defensetech.org/2013/05/24/congress-orders-f-35-software-plan/ http://www.reuters.com/article/2014/01/23/us-usa-lockheed-fighter-idUSBREA0M1L920140123 I kept it to one article per year.
|
# ? Apr 10, 2014 21:53 |
|
Was the software split up in such a way to hire a coder from every congressperson's district?
|
# ? Apr 10, 2014 21:56 |
|
Plorkyeran posted:I've encountered a lot of caches that don't actually make anything faster. Common reasons include terrible cache implementations that take as long to look up things as looking them up in the database, caching things that take less time to compute from scratch each time than to cache, the cache getting invalidated too frequently to be of any real use, having to spend enough time ensuring the cache gets invalidated when needed that it ends up outweighing the speed gains, bad LRU implementations that slow down as the cache gets bigger and so appear great in tiny benchmarks but suck in real usage, and just plain never actually reading stuff from the cache. I get really twitchy about people who think just slap more caching in makes things faster. This place loved to cache things, the answer to nearly everything was to just add more caching, or a queue. At one point I shaved 14% off page load time because the caching god object was getting initialised twice - yes initialising there was a cache initialised on every page load and it took a significant amount of time to init, most of that was reading stuff from other caches. There were caches in IIS, there were caches in application memory, there was memcache, there were caches backed by database tables and there was even a HTTP cache over the front end but I think that part was added to the system by mistake. There was also the file cache which cached city locations for a flash based map, this read values from the database every 24 hours to write the cache files. One of my first tasks there was to make this cache regeneration take less than 24 hours to complete, I got it down to 7 seconds. I didn't know the full pipeline at the time so hadn't actually realised that these were used to serve as a real time lookup cache on the web front end. The files used all the latest cool technology, by which I mean XML. The files looked like this: code:
The most catastrophic caching failure was colloquially known as black Tuesday. The office had a number of large plasma displays showing real time, or near real time (yes some people wanted to add some caches to get lower latency), monitoring statistics from our various servers. Suddenly all 12 web nodes turned red on the displays, every graph - page load time, CPU usage, network connections, etc... - went to the limit and stayed there. Rebooting nodes gave a temporary respite of a couple of minutes but then it would immediately be pegged at maximum load. Naturally this created something of a panic, the site was completely down and nothing had changed, no new code, we weren't dealing with a dos attack - request attempts were down. We just didn't know what had happened. Eventually the cause was located, and there was much wailing and gnashing of teeth when it was. The system stored places mapped from identifying codes, and at some point it was decided that simply reading them from the database was for amateurs, so a cache was used. The architecture of the cache was for the application to read the entire table into memory and look it up from there, periodically the app would re-read the data. It would also re-read the data if it tried to look up a key that didn't exist in the cache, imagine what happens if an identifier gets into the system that doesn't exist in the database when this cache is used on nearly every page at a rate of about 6000 connections per minute.
|
# ? Apr 10, 2014 22:17 |
|
Zombywuf posted:Then there was the cache that quite sensibly stored values in a hash table. Did I say sensibly? I meant . The key value pairs in the hash table looked like this "(<key>_<value>, True)". The entries would be iterated over until a key was found with a prefix matching the looked for value. This is definitely my favorite part.
|
# ? Apr 10, 2014 22:30 |
|
tractor fanatic posted:Is it intractable to write a formally proven TLS library in C, or is mathematical correctness just not a high priority? There's a formally proven TLS library in F#, miTLS. Proving semantics is much easier in a functional language with a garbage collector. It's possible that miTLS could be "lowered" to C, but it would require carefully proving each step of the translation. There are other attempts at formally verifying C programs like Frama-C which might be applicable as well.
|
# ? Apr 10, 2014 23:13 |
|
Scaevolus posted:There's a formally proven TLS library in F#, miTLS. I can buy that miTLS is formally correct, but what about timing attacks?
|
# ? Apr 10, 2014 23:15 |
|
vOv posted:I can buy that miTLS is formally correct, but what about timing attacks? Also noise emission attacks?
|
# ? Apr 10, 2014 23:36 |
|
vOv posted:I can buy that miTLS is formally correct, but what about timing attacks? http://www.mitls.org/wsgi/tls-attacks posted:[timing-based side channel attacks against cryptographic primitives] are outside our model, and we rely on the proper implementation of core cryptographic algorithms by the Bouncy Castle library that we rely on.
|
# ? Apr 10, 2014 23:37 |
|
Why in God's Greed Earth is it called Bouncy Castle. It's one of those names that may as well come with a record scratch sound effect when you mention it in a meeting.
|
# ? Apr 11, 2014 01:15 |
|
It would be cool if a record scratch noise played in a meeting when people suggest using some GPL bullshit
|
# ? Apr 11, 2014 03:14 |
|
return0 posted:It would be cool if a record scratch noise played in a meeting when people suggest using some GPL bullshit A few of us had a little app that made record-scratch and sad-trombone noises for conference call use. It was very valuable when talking to a certain set of people.
|
# ? Apr 11, 2014 03:26 |
|
ultramiraculous posted:Why in God's Greed Earth is it called Bouncy Castle. It's one of those names that may as well come with a record scratch sound effect when you mention it in a meeting. Probably the same mentality that leads to one of the largest software companies in the world putting in a ball pit for its employees.
|
# ? Apr 11, 2014 03:48 |
carry on then posted:Probably the same mentality that leads to one of the largest software companies in the world putting in a ball pit for its employees. Because it's cheaper than paying cleaners to maintain urinals?
|
|
# ? Apr 11, 2014 08:40 |
|
Said company will continue putting in ball pits as long as it remains an effective PR gimmick to attract talented introverts.
|
# ? Apr 11, 2014 09:13 |
|
Gazpacho posted:Said company will continue putting in ball pits as long as it remains an effective PR gimmick to attract talented introverts. Almost as if not taking yourself 100% seriously can be an effective strategy for attracting adults with a sense of humor!
|
# ? Apr 11, 2014 13:51 |
|
ultramiraculous posted:Why in God's Greed Earth is it called Bouncy Castle. It's one of those names that may as well come with a record scratch sound effect when you mention it in a meeting. I'm not sure if you just typoed but you are aware that it's "God's green Earth", not "greed", right
|
# ? Apr 11, 2014 14:02 |
|
Volmarias posted:Almost as if not taking yourself 100% seriously can be an effective strategy for attracting adults with a sense of humor! I'm starting to think a ball pit would work wonders for my back.
|
# ? Apr 11, 2014 14:59 |
|
Hammerite posted:I'm not sure if you just typoed but you are aware that it's "God's green Earth", not "greed", right Awful.app
|
# ? Apr 11, 2014 16:19 |
|
ultramiraculous posted:Why in God's Greed Earth is it called Bouncy Castle. It's one of those names that may as well come with a record scratch sound effect when you mention it in a meeting. Because the charity that maintains it is called Legion of the Bouncy Castle, obviously: https://www.bouncycastle.org/about.html posted:As the Legion of the Bouncy Castle Inc. (ABN 84 166 338 567) operates as a Registered Charity At least they didn't pick some godawful 1337 poo poo name, I guess As Volmaris pointed out, being overt about having a sense of humor is better than confirming you have none, but I'm not crazy about the name they picked, either.
|
# ? Apr 11, 2014 17:48 |
|
I wonder if any companies refuse to use git or python because of the silliness of their names. I just recently saw a clojure-related vim plugin called "fireplace." The readme says the name was changed from "foreplay" "so Java developers wouldn't have to speak in hushed tones."
|
# ? Apr 11, 2014 18:25 |
|
return0 posted:It would be cool if a record scratch noise played in a meeting when people suggest using some GPL bullshit What's wrong with GPL bullshit if it is pretty much industry standard. Right now I'm having to use Eclipselink 2.1 (with 2.0 persistence / mapping files) on Weblogic 10.3.6.0 since we are allergic to Hibernate. I still can't get named stored procedures to work in the orm file, persistence file, or annotations. It takes us twice as long to get solutions to our problems / figure out implementation. At least using JPA 2.1 with Hibernate as the persistence provider, everything just worked. We have actually been told to start looking for commercial solutions rather then using open source solutions (including Apache, BSD, or Google Licensed software). Another horror: We are just moving people to Maven. However, we can only use white listed artifacts from the artifact server. Yes, even the version has to be white listed. If we require some other software, I have to fill out a 20 page document, have it sent off to legal, wait 2 months, and then get a yes or no. Did I mention we are agile? Scaevolus posted:Proving semantics is much easier in a functional language with a garbage collector. It's possible that miTLS could be "lowered" to C, but it would require carefully proving each step of the translation. I often think it would be great to teach functional languages at the start. Then I remember that most people have been taught how to do most things in life as procedural tasks. It would be pretty hard to break that ingrained method. HFX fucked around with this message at 19:16 on Apr 11, 2014 |
# ? Apr 11, 2014 19:12 |
|
Well here's a good sign for the books: hopefully cut down some posts here, ...GCC 4.9 posted:- Google has added an Undefined Behavior Sanitizer to GCC 4.9, complementing the existing Address Sanitizer, etc. When passing -fsanitize=undefined, GCC will attempt to detect undefined runtime behavior for C/C++ code-bases. http://www.phoronix.com/scan.php?page=news_item&px=MTQ0OTc
|
# ? Apr 11, 2014 19:24 |
|
As a followup to "bool success = true" from pages back it turned out that on a more detailed look (i.e. I fixed the code) it also used a foreach over 5 executions with a set to success on each one and no throw on failure so even if the first execution failed as long as one of the others succeeded it returned a success for the whole lot. Then again, it didn't log anything on failure so I guess it didn't matter
|
# ? Apr 11, 2014 19:44 |
|
MrMoo posted:Well here's a good sign for the books: hopefully cut down some posts here, ... Its scope is really narrow. I just compiled and ran a couple examples of undefined behavior from the C++ standard with no observable effect. From the commit linked, it looks like as of that article, it only adds runtime checks for division by zero, INT_MIN/-1, out-of-bound shifts, and reaching __builtin_unreachable.
|
# ? Apr 11, 2014 20:04 |
|
The Laplace Demon posted:Its scope is really narrow. I just compiled and ran a couple examples of undefined behavior from the C++ standard with no observable effect. From the commit linked, it looks like as of that article, it only adds runtime checks for division by zero, INT_MIN/-1, out-of-bound shifts, and reaching __builtin_unreachable. It'll probably get better quickly. In my experience just convincing gcc to take a new thing can take a while, and the simpler the thing the easier it is. I'd be surprised if their internal version wasn't already more advanced.
|
# ? Apr 11, 2014 20:55 |
|
UBSan's been around for quite a while without getting anything new, and the other sanitizers haven't had a burst of new development after being ported to GCC.
|
# ? Apr 11, 2014 21:45 |
|
Plorkyeran posted:UBSan's been around for quite a while without getting anything new, and the other sanitizers haven't had a burst of new development after being ported to GCC. Why must you crush my hope?
|
# ? Apr 11, 2014 22:28 |
|
Wasn't that LLVM post linked here? The one that went through undefined code and how hard it is to report out "the compiler is assuming this comparison with a variable hoisted out of an inline looped submodule pinch header will always be true". IIRC it was in the context of that dereferenced pointer eliminating the null check. fake edit: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
|
# ? Apr 11, 2014 22:49 |
|
The Laplace Demon posted:Its scope is really narrow. I just compiled and ran a couple examples of undefined behavior from the C++ standard with no observable effect. From the commit linked, it looks like as of that article, it only adds runtime checks for division by zero, INT_MIN/-1, out-of-bound shifts, and reaching __builtin_unreachable. I guess they need to define more of the undefined behaviors they're looking for.
|
# ? Apr 11, 2014 23:01 |
|
JawnV6 posted:Wasn't that LLVM post linked here? The one that went through undefined code and how hard it is to report out "the compiler is assuming this comparison with a variable hoisted out of an inline looped submodule pinch header will always be true". IIRC it was in the context of that dereferenced pointer eliminating the null check. Why did you change your avatar from a CPU to an anime
|
# ? Apr 11, 2014 23:07 |
|
vOv posted:Why did you change your avatar from a CPU to an anime ... what does that have to do with anything in this thread?
|
# ? Apr 12, 2014 00:12 |
|
I have stared into the code of non technical interns, and the code has stared back into me. Why have functions that can take parameters when you can just make a class called "input" which takes a bunch of user input from the console when it's initialized, and then derive classes from that which then implement functions that use the instance variables to figure out what to do? That's helpful.
|
# ? Apr 12, 2014 01:02 |
|
Doc Hawkins posted:I wonder if any companies refuse to use git or python because of the silliness of their names. At one of the talk sessions at I/O a couple years ago, Google introduced a game development framework that would let you write Java and then it would generate code for running the game in either a Java runtime, iOS, Android, or HTML5. They named it "ForPlay." The framework was interesting but it was hilarious how the presenter was awkwardly trying his hardest to use the same inflection while saying the name, so that it sounded "For Play," not "Foreplay."
|
# ? Apr 13, 2014 06:13 |
|
kitten smoothie posted:At one of the talk sessions at I/O a couple years ago, Google introduced a game development framework that would let you write Java and then it would generate code for running the game in either a Java runtime, iOS, Android, or HTML5. This one? https://www.youtube.com/watch?v=F_sbusEUz5w&t=861s
|
# ? Apr 13, 2014 21:57 |
|
|
# ? Jun 8, 2024 07:05 |
|
That's the one. Maybe a month or so after that talk was given, they renamed it PlayN.
|
# ? Apr 14, 2014 01:53 |