|
xzzy posted:As for the plugin problem, I don't even know what that means. After you get syntax highlighting (and vim ships with rules for just about every language), what else is there? Tons of stuff. I have a very lightweight vim configuration and still have plugins for autocompletion and showing the git diff in the line number gutter. I guess whether you find plugins useful depends on where you want to draw the line between portability (since not all vim installs will have your special snowflake setup) and creating a personalized IDEish experience for yourself.
|
# ¿ Jan 22, 2016 19:04 |
|
|
# ¿ May 17, 2024 15:38 |
|
Try the Working in Development: Unironic Agilefall thread for good times
|
# ¿ Jan 27, 2016 17:28 |
|
Code looks like a mad doctor turned Wordpress inside out. Did you pry that code off a dead Cold Fusion developer or what? Radium-rear end code.
|
# ¿ Jun 17, 2016 21:56 |
|
xzzy posted:UNIX almost managed it with epoch time Ah yes a single standard computing epoch!
|
# ¿ Aug 5, 2016 17:31 |
|
Klades posted:Now you have me imagining a Java programmer trying to code in C++ without bothering to understand the differences, just slapping down java code and changing it until it compiles. This programmer is not imaginary
|
# ¿ Aug 16, 2016 14:56 |
|
Only when all tokens are whitespace will we have achieved enlightenment
|
# ¿ Sep 19, 2016 15:55 |
|
Whitespace is the only language which exhibits Buddha-nature, for it is indistinguishable from no code at all
|
# ¿ Sep 19, 2016 16:18 |
|
I was really tired at the end of the day earlier this week and wrote code:
|
# ¿ Oct 8, 2016 02:19 |
|
Just use non-printing ASCII characters for the delimiters, duh. No one's never going to type an ASCII ACK! *starts accepting non-ASCII content*
|
# ¿ Oct 12, 2016 14:53 |
|
Let's not miss the horror where the cache was being updated with written values despite the hardware write apparently failing e: fb
|
# ¿ Oct 26, 2016 16:43 |
|
NihilCredo posted:Nullos non patieris vivere. There are very, very few reasons to allow nullable columns in your schema to begin with. You'll live much happier if you can assume NULLs only come from unmatched outer joins. The only use case I could ever think of in which nullable columns were even a little okay was a "modified date" where the business case stated that if a record had never been modified the UI should be presented as blank. It was nicer to allow that value to be NULL rather than have defined a sentinel value or introduced display logic in which "if modified date == created date then modified date is blank" But yes even this could have been solved by evolving the schema into an even more normal form
|
# ¿ Apr 28, 2017 19:48 |
|
Spatial posted:No, but this isn't something I do professionally or at scale. What's wrong with it? Let's say when a user accesses a Person record they always want to know whether or not they're dead, so every retrieval of a Person from the database requires a JOIN to Person_Death. That means the Person_Death table is as hot as Person, which means space for another table on what may be an expensive storage medium...but a DBA maintaining this schema might not necessarily realize that and put Person_Death on a slower but cheaper storage. Whoops, now all Person retrieval is only as fast as the Person_Death storage! Getting a more into long-term database design, you may want your Person table to be partitioned by whether or not a person is alive or dead. It might make sense for records corresponding to living people to be on a faster storage medium and dead people can be on nearline storage - accessible, but slower. A DBMS can manage table partitioning by a date column but that date column needs to exist on that table*. "Pfft, just keep a flag on the Person table indicating whether they've died and partition by that"...okay, but now you've violated a ~perfectly normal~ form and you still require a JOIN to get the information that a human probably wants anyway. "Properly normalized" databases are great in theory. In practice you make a schema that makes sense for your use cases. Normalization and denormalization both have their place in the world. Dylan16807 posted:You need special display logic either way so even in that scenario using NULL instead of 0 doesn't buy you much. I'm not a UI guy at all so don't hold me to this, but shouldn't data binding to an unset field just work? Requiring a client side data binding to understand that a certain sentinel value means "no date" sounds like a horror to me. * edit: I'm like 98% positive about this. A DBMS might be able to manage table partitioning by information that's not actually on that table but if so that's awfully strange and almost certainly less performant. Oracle probably touts it as a flagship feature csammis fucked around with this message at 00:07 on Apr 29, 2017 |
# ¿ Apr 29, 2017 00:02 |
|
return0 posted:Is person to death date one to one? Good question! We've been assuming one to zero or one to one, but your business case might state that nope a record in the main Person table (as opposed to in an historical table / data warehouse) has to maintain a one to many relationship to death date. But hey, now that implies that person to birth date is also one to many, unless you're drawing a distinction between a person becoming not-dead and a person being born in which case you need yet another field to record a 1-many dead-to-alive transition date versus a 1-1 being born date...but is there a medical case in which someone has been recorded as born multiple times? gently caress it, let's make a LivenessStateChange table with a columns for event date and event type (UnbornToAlive, UnbornToDead, AliveToDead, DeadToAlive, etc.) and one-to-many the relationship between Person to LivenessStateChange. If this conversation doesn't make you sad about databases then you should become a data architect for Cerner or Epic because I guarantee this argument has been had before
|
# ¿ Apr 29, 2017 18:34 |
|
Like literally everything else in the entire job-seeking discussion, it depends on the company. I know that I got my current job because I had pet embedded dev projects on my Github and I was able to talk passionately and in detail about them. The hiring manager and his manager talked with me about those projects at length in the interview, and since I had next to no professional experience in the field that was all we could go on.
|
# ¿ Jun 29, 2017 03:32 |
|
Spatial posted:A couple of days ago I came across this line which made me double-take: It works out to 0x28064000...is that address aliased to a region that maps to the SDRAM with those specific parameters? edit: Jabor posted:Are you sure it's 3 and 4 that are the parameters there? I would have thought that it's the 3 and 2, and the shift by 4 is to put the 3 in the right bits. I would think that too but I also wouldn't think that an MCU would do what I suggested above anyway. The parts I've worked with have discrete modes for setting the timing parameters prior to reading and writing. csammis fucked around with this message at 03:06 on Mar 6, 2018 |
# ¿ Mar 6, 2018 02:44 |
|
“Float”?
|
# ¿ Jun 28, 2018 13:11 |
|
areEqual
|
# ¿ Sep 5, 2018 16:18 |
|
I have two shirts with this
|
# ¿ May 20, 2019 20:42 |
|
feedmegin posted:My most recent fun one was a bug in the hardware specification of the RAM being accessed by the Cortex-M0 on the FPGA for which I was writing firmware, where the byte lane enable signals on the data bus weren't routed properly so all loads and stores were 32 bits even if the machine code was intending to do 16 or 8. Actually worked almost fine because most of the variables in the firmware were in fact 32 bits, but then I'd put a char variable on the stack or something and variables around it would mysteriously get corrupted. This exact problem but it was our EDA librarians who created the RAM component symbol with byte lane enable signals as swappable when in reality they weren't. Most projects didn't have an issue because the person doing the PCB routing happened to pick the right order because it happened to be easier for the layout. Guess whose project didn't guess correctly Spatial posted:Current favourite bug: Low power microcontroller's sleep state from which it is able to wake 999,999 out of 1,000,000 times. Sounds like it's time for a fun chat with the vendor!
|
# ¿ Jul 18, 2019 15:00 |
|
quote:OOP code is non-deterministic — unlike with functional programming, we’re not guaranteed to get the same output given the same inputs. This makes reasoning about the program very hard. As an oversimplified example, the output of 2+2 or calculator.Add(2, 2) mostly is equal to four, but sometimes it might become equal to three, five, and maybe even 1004. The dependencies of the Calculator object might change the result of the computation in subtle, but profound ways. OOPs… Goofus the object-oriented programmer codes his addition operator to return random values. Gallant the functional programmer would never change the implementation of a function
|
# ¿ Aug 21, 2019 22:18 |
|
JawnV6 posted:the best part of atwood's visit was him latching onto forums user Victor as the sole voice of reason amongst a bunch of nay-sayers Agreed, I vaguely remembered that thread and was glad to re-read it. Oh Victor
|
# ¿ Oct 14, 2019 20:24 |
|
Thermopyle posted:That might be better than a check engine light that flashes at you for every possible reason from the minor to the major. Maybe? It’s not like a message about BAD SECTORS is more actionable to the driver than a check engine light, or even more understandable to most people.
|
# ¿ Oct 18, 2019 17:41 |
|
netcat posted:I feel like I'm one of the few people who don't mind meetings that much because it's a nice break from having to stare into a glowing rectangle all day.
|
# ¿ Apr 30, 2020 21:05 |
|
I think you missed the “arbitrary number of 72 character-wide lines” part. No one’s saying you’re limited to exactly 72 characters after a 50 character subject line. It’s still a stupid loving rule.
|
# ¿ Jul 5, 2020 00:18 |
|
pokeyman posted:The couple times a year when I do that last one, I immediately spend an hour making the build faster in penance. What’s faster than not running the build?
|
# ¿ May 2, 2021 16:21 |
|
“Hey csammis, we need you to take over this feature. The guy who wrote it is gone and the guy who tried to fix it can’t get it finished.” It’s all C++-without-classes functions with no fewer than 21 parameters, some of which are references to pointers to objects with still more parameters. I think I know why the feature’s been orphaned
|
# ¿ Jun 21, 2021 20:23 |
|
The person who approved the feature is also no longer with the company
|
# ¿ Jun 21, 2021 20:44 |
|
Volmarias posted:I hope you had a very delicate conversation with your boss about how this is going to require an outsized amount of time, either in fixing it, or completely rewriting it. In fact the opposite! It’s so loving bad that my boss convinced the product manager that it is absolutely critical that we refactor or rewrite this before adding the new pieces they want because multiple engineers have taken a stab at it and failed. It’s the textbook definition of unmaintainable and it’s a pretty important feature for the product. I was asked to be the fixer and given five months. Tei posted:It would be fun to document how is actually used. Maybe you can mark the methods that are really in use. This is how I started yesterday - I was hoping I could just begin by cutting entire chunks. No such luck. quote:the whole codebase is dumb poo poo. In all of the rest of my company’s engineers’ defense, the vast vast vast majority of our codebase does not look like this. The feature in question is thankfully not foundational. If it were,
|
# ¿ Jun 22, 2021 13:51 |
|
I’ve worked for a company that went into git submodules so hard that wouldn’t be unusual to have a superrepo with at least a couple hundred of them. None of them used semantic versioning, or a coherent feature / bug fix branching scheme, and you’d better believe there were interdependencies. Like DLL Hell all over again but it would take half a day to update submodules and get a good build going.
|
# ¿ Aug 5, 2021 14:13 |
|
Dehumanize yourself and face to ten levels of indent
|
# ¿ Sep 15, 2021 18:11 |
|
Tei posted:I like the C++ way. This is a loving pro tier post, just outstanding
|
# ¿ Oct 9, 2021 00:38 |
|
...well, is there?
|
# ¿ Dec 2, 2021 01:01 |
|
Zopotantor posted:IIRC the original BASIC had an OPTION BASE 0/1 command, checks out. This was true through VB6
|
# ¿ Dec 7, 2021 22:11 |
|
Sagacity posted:Yes, having the URL hashcode method do a DNS lookup definitely means that the entire language and standard library is trash. Yeah if anything it’s the fact that the entire language and standard library are trash means that the URL hashcode method was destined to be trash too
|
# ¿ Dec 15, 2021 15:37 |
|
If we accept the axiom that all code is bad and that to write code is a sin, then von Neumann, Turing, Backus, Lovelace, Hopper, etc. are the greatest sinners of them all
|
# ¿ May 13, 2022 05:57 |
|
I had to check the date on this tweet because I discovered the same msvc “limitation” in 2009ish. I think it had something to do with automated code generation for a JNI bridge.
|
# ¿ Dec 18, 2023 16:32 |
|
|
# ¿ May 17, 2024 15:38 |
|
Jen heir rick posted:This is really a database horror than a coding horror isn't it? Not that it matters, poo poo still sucks. What is a database but coding horrors made manifest
|
# ¿ Apr 3, 2024 14:08 |