Spyke

Replies

Comment on

Why Learning to Code is So Damn Hard

Reply in thread

Test driven development. It's a technique where you know what behaviour or result the code should produce, but you haven't written any producing code yet. So you break down the problem into small steps which each produce a testable result or behaviour that brings you closer to what you need. And before writing any implementation for each of these small steps, you write a unit test which checks whether an implementation would execute this step correctly. Once you have each test set up, you can start writing the implementation, keeping it as simple as possible, and running the test until it passes for your implementation. This keeps going in a cycle.

Once all your tests pass, provided you've written good and correct tests for every step, there are several benefits of this approach:

  • you can be quite confident that your code works as expected
  • making changes to existing code is much less scary, because you can change the thing you need to change, adjust or add tests accordingly, and rerun all the other tests to make sure everything else still works as expected
  • there is a big psychological benefit when you force yourself to define exactly what you expect the code to do before you actually write it
  • it can help others understand what the intent behind the code is by looking at its expected behaviour

The downside is that it takes more time to write tests for everything. But for complex applications, it will save you a lot of time in the long run if the code will be changed very often in the future or is complicated, because many bugs will be caught by your test landscape.

Comment on

What are your favourite songs with epic bass drops?

You just sent my ADHD brain into the depths of my music library for 2 hrs. It's early morning and I have shit do do man, why would you do this to me? There are soo many I could list here, ranging from Dubstep to Drum and Bass, to Bass Music and Trap and almost every other kind of electronic music. Most Techno, especially Trance basically revolves around building up and dropping one big and epic drop.

Personal bias and nostalgia, but Rusko - Everyday (Netsky Remix) has to be one of the sickest bass drops of all time.

If we start listing Techno drops here, this thread would never end, so I'll refrain. Here's just one example: Space 92 & The Yellowheads - Planet X

The same is true for Wave music, but here's a taster: Deadcrow - GT1000

Disclosure, Eliza Doolittle - You & Me (Flume Remix) is a masterpiece in its own right. But this brass band live performance of the track restores my faith in humanity every time I listen to it.

Some honorable mentions in a similar vein:

privacy

Comment on

if you looking for a good alternative for google search, try "SearXNG"

Reply in thread

Of course it can be done, check your web server logs.

If you are using GET requests to send search queries to searxng, what you searched for will show up in the logs as

2024-10-31 123.321.0.100 /?query=kinky+furry+pictures

If you use POST requests the server admin can also easily enable logging those.

People hosting searxng can absolutely see what you searched for, along with your IP address, user agent string etc.

python

Comment on

How is my Python code?

Reply in thread

Not the original commenter, but no need to apologise my friend. Nice work. Learning tip from me: give PEP 8 a read and save it for reference somewhere. It's the standard for how to format Python code, and future you will thank you for internalising it early on in your Python journey

privacy

Comment on

DuckDuckGo failed me today

Reply in thread

In Firefox, you can use the cookie autodelete extension (it's open source) which deletes all cookies for sites you haven't explicitly whitelisted. Same thing, integrates well with other privacy features on Firefox (like container tabs and I still don't care about cookies, and is probably better maintained than the feature in DDG.

IMO starting with a more minimalistic base, and adding whatever features you need is a better approach that suits more use cases. Just reduce your extensions to what you really need, and deactivate or uninstall those you don't need. Make sure what you are installing is open source, well-maintained and trustworthy (look at the github page: when was the most recent commit or release? how many contributors and stars are there? It's not foolproof, but a good start and definitely beats closed source extensions). Having access to more extensions is not a bad thing.

EDIT: don't use I don't care about cookies as it was acquired by some shady companies. Use the independent fork called I still don't care about cookies instead.

Comment on

Windows 10 only has a year of support: 12 months left to keep Copilot off your desktop or learn Linux

Reply in thread

Maybe you've been sold a bit of a lie.

Linux is not like Windows. Linux will never be like Windows. It is first and foremost a general operating system, not necessarily a Desktop operating system.

IMO, that means you will never truly be able to completely avoid using the terminal here or there.

Telling people that it's easy to switch from Windows to Linux is just not true. Linux just works differently and going in with the expectation that things will work the same way only serves to disappoint those brave enough to attempt the switch.

If you try again, go in with the mindset that you've never used a computer before, and without needing to depend on Linux for your day to day computer work. See it as a tinkering side project, and maybe it will stoke your curiosity enough that you'll want to use it day to day.

Comment on

How to get away from doomerism in my media feeds?

Reply in thread

I just want to say thank you for writing such a detailed response. It's been quite eye-opening for me, I wasn't even aware that so many great resources and communities exist to explicitly counter this sentiment I've been feeling about negativity in news and other media.

It's very encouraging to see that I'm not the only one with this feeling, and even just the responses to this post are sending me on a whole journey of being more positive!

Comment on

The solution to many problems

Reply in thread

What does smoking a cigarette here or there has to do with addiction?

Where did I or the original post mention anything about occasional smokers? This post is offensive to those struggling from lifelong addiction to cigarettes, which is almost never a choice.

Also wouldn't it be the best advice against addiction find the will in oneself to stop doing it? If addicted smokers know what their cigarettes do for themselves and others, then they might want to try search for help, to get them off their addiction?

Gee, that's such great advice! Why didn't the lifelong addict think of that one themselves? You just singlehandedly solved addiction.

Noone chooses being addicted to cigarettes. It's a mental health disorder just like being addicted to fentanyl or heroin, and a crippling one at that for some. Please educate yourself about what addiction is before defending posts like this. What you are doing is similar to shitting on people for "choosing" their sexuality or gender.

privacy

Comment on

DuckDuckGo failed me today

Reply in thread

You are correct, I don't care about cookies was acquired by avast. It is still GPL3 licensed and, according to the privacy policy, does not capture user data. But for those who don't trust avast (which includes me), there is an independent fork called I still don't care about cookies. The builtin Firefox cookie deletion settings are not granular enough for my usecase (with container tabs) and a hassle to configure for imo, which is why I still recommend the forked extension if it suits your usecase.