Curious Perversions in Information Technology
7k followers 5 článkov/týždeň
Representative Line: Ripping Away the Mask

Jason was investigating a bug in a bitmask. It should have been set to 0b11, but someone had set it to just plain decimal 11. The line responsible looked like this: byte number = (byte) 11; This code takes the decimal number 11, casts it to a byte, and stores it in a byte, leaving us with the decimal number 11. Curious, Jason checked the blame...

Mon Oct 14, 2024 14:42
Error'd: You Don't Need A Weatherman

...to know which way the wind blows. This week, it's been an ill one. Two of our readers sent us references to the BBC's reports on unusual weather in Bristol - one from the web, and one mobile. Maybe that will help you deduce the source of this error. Frist, Graham F. shared a screenshot of the beeb's mobile app, bellowing "I know Milton...

Fri Oct 11, 2024 13:56
CodeSOD: Idtoic Mistakes

Working at a company where the leadership started as technical people has its advantages, but it can also carry costs. Arthur is in one such environment, and while it means that management and labor have a common vocabulary, the company leadership forgets that they're not in a technical role anymore. So they still like to commit code to the project....

Thu Oct 10, 2024 15:26
CodeSOD: JaphpaScript

Let's say you have a web application, and you need to transfer some data that exists in your backend, server-side, down to the front-end, client-side. If you're a normal person, you have the client do an HTTP request and return the data in something like a JSON format. You could certainly do that. Or, you could do what Alicia's predecessor did. <script>...

Wed Oct 9, 2024 16:13
CodeSOD: A Cache Exists

Ben's web firm took on a new client, and they're using a rather questionable shopping cart system. Like a lot of PHP web plugins, someone decided that they needed to "protect" their code by obfuscating it. Either that, they were obfuscating it out of shame, one or the other. if(!function_exists("cache_exists")) { eval("fu" . "nction cach" . "e_exi"...

Tue Oct 8, 2024 15:23
Representative Line: Try to Catch This

The power of exception handling is that it allows every layer in our stack be notified of an error condition, do something about it, and pass it on if necessary. For example, if you have a data access layer and a query fails, you may catch the exception and potentially retry there, only passing the exception up the stack after a few failures. Or, you...

Mon Oct 7, 2024 14:14

Vytvorte si vlastný informačný kanál

Ste pripravení to vyskúšať?
Začnite 14-dňovú skúšobnú verziu, kreditná karta sa nevyžaduje.

Založiť účet