• 0 Posts
  • 83 Comments
Joined 1Y ago
cake
Cake day: Jul 01, 2023

help-circle
rss

I’m at least happy head hunters stopped spamming my LinkedIn


Often I use Python for exploratory purposes. Like, I got a bunch of data, and I want to know if a particular algorithm might work or not. I implement the algorithm, but realize the results don’t look good enough. So I tweak the algorithm, maybe even do major refactoring. Or maybe I realize my visualizations or metrics don’t capture what I need to see. Or maybe I must settle for some compromise?

I iterate on this repeatedly until I find something I’m happy about (or until I give up). Sometimes I end up with something completely different from my initial idea.

TDD won’t help me much here because the end result is unknown. For each iteration of this idea process I might even need to rewrite all the tests because none of them are valid anymore.


TDD only works well if the problem is clearly specified before the first line of code has been written, which is rarely the case when I need Python for something.


Mostly number crunching and data exploration tasks. Just so I can make informed decisions about the data I got. I do this rarely enough so it hasn’t been worth for me to install all these extra third party support wheels.


“Ohh, I got all these numbers I want to crunch using numpy or pandas and plot it using matplotlib. Hold on, I just need to write unit tests first.”


Catching some errors is better than catching no errors. No compiler in any language can protect you from all runtime errors either way, but some are better at it than others.


I shouldn’t need to do unit tests for quick one off scripts


I would swap Python with C++. Constantly dealing with stupid runtime errors that could’ve been easily captured during compile time.

Did you forget to rename this one use of the variable at the end of the program? Sucks for you, because I won’t tell you about it until after 30 minutes into the execution.


although in the context of version control, the term master simply refers to the gold master, a term borrowed from the recording industry which refers to the final mixed version of a recording, and does not have a corresponding slave.

Either way, I think “main branch” is easier to say, so it’s a win.


Ok, roadside assistance is maybe worth that price, but the rest are just API calls that cost them virtually nothing to operate. There’s no need for them to keep these functionalities hostage behind some roadside service, other than to be anti consumer.

Not to mention that by paying $90 extra you unlock the functionality to remote unlock your car. What’s the justification for this price? There’s no way it costs this much extra.


$59 is still too much to ask for what amounts to just a few API calls to some cloud service.


At least move the CAPS LOCK key. There’s no good justification for why it should be on the home row.


One benefit of using dropwhile is that (with a bit of practice) it can actually be easier to read than a for loop. All for loops look similar. You need to read the for loop line by line to understand what it really do.

With dropwhile (or map, filter and reduce), it’s immediately obvious it will drop all elements until a certain condition turns false.


Don’t touch things unless you have a good reason to do so. And when you have a good reason, touch it exactly as much as you need - but never more.


You don’t need to know math or physics to build a house. Sure, it can help if you know those things, but it’s not essential.

Same goes with programming. Math and programming are two separate skill sets, but knowing one can probably help with the other.

Also, a question for you. Why do you want to do Common Lisp? If you’re skeptical about your abilities I recommend to start with a more common programming language (like Python, Java, C#). Easier to find good learning resources.


I don’t think Sean makes as many public appearances anymore, so probably safe. But who knows what he will do.



Seems like they’ve fixed it now, but there was a time when they had proof of stake without withdrawal functionality


Haven’t checked it in a while, but is it still impossible to withdraw staked coins?


That’s basically it, except everything is darn expensive.



Learning about reflog was a game changer. Now I’m never afraid of breaking my branch. If I mess up, I can always git reset —hard to a previous state.

Another game changer was learning that a perfectly valid way of doing squash is to do git reset to an earlier commit and then do git commit -a. Saves a lot of rebasing headache.



Well at least we got a backup, right?

Right???


Maybe the it’s the English language that is wrong?


Serverless is more associated with micro services where each micro service can scale independently from each other.


I hope they learned the value of protecting your branches.



I usually use the GUI in IntelliJ for those kind of purposes, but any other GUI might do. Then I perform a manual binary search to find the commit I want.


I think comments should be a last resort when all other methods are inadequate. Proper git commit logs have helped me many times to understand why a certain thing is needed.

Git logs don’t need maintenance either. They always tell what was true when the code was written. Comments need maintenance, and are often difficult to keep updated.

You can write a detailed comment about the whys of a particular function, only for it to become outdated in weeks when the functionality has changed.


According to who? If I have access to the source code, which I often do, I’d rather just read the code. Chances are that if documentation exists, it’s no longer up to date.


You can find them by reading the code. It’s not difficult if they’re placed at proper locations.


Often you can find the “why” in the file’s Git history. If done properly, you should be able to find which commit introduced this change, and which issue is attached to this commit.


The why can usually be found in Git and issue trackers. Just look at the history of the file to get some decent clue about why a piece of code was programmed in a certain way.


No. Just give the function a good descriptive name with good descriptive parameters. Keep the function simple too. If you can’t, try to refactor and see if that helps.

If you are still unable to express yourself via code, then you should use comments to guide the reader.


Too late. The entire web is infested with garbage GPT generated articles with outdated or false information.


Tying NFTs to a physical object is quite pointless. It can make no guarantees that it’s the only NFT for that physical object, or if the physical object even exists.


You’re right. It will evolve into a different even more stupid scam on the blockchain. And people will fall for it again.


If the choice was between Mac vs Windows I would probably go with Mac, as it’s Unix based.

In a previous job I had to use Windows. I think it’s tolerable at best. Thankfully WSL along with the new Windows terminal is pretty good these days. I don’t miss the days when MSYS was the only Linux-like option for windows.


Different computers. My work provide me a dedicated work computer. My work doesn’t really care which OS I’m using on their computer. Only that I’m doing the job, and I’m most productive on Linux.

But if I for some reason had only one computer I would probably dual boot to keep my work and personal life separate.