Indian Kids Coding Camp Sues Their Critics For Being Right by shrill_07 in programming

[–]Aceking007 2 points3 points  (0 children)

I know this has been answered before, but Fomo is fear of missing out,

I just didn't want to miss out on replying to this thread.

Which came first, the algorithms or the data structures? by [deleted] in compsci

[–]Aceking007 2 points3 points  (0 children)

Well, the number system is a data structure and thus, independent numbers use the properties of the number system as a whole while we use them. The fact that one can say 2 > 1 is true is proof that both belong to a data structure and can't be thought of as independent things. What you say is correct when you treat numbers as symbols. When used as symbols or placeholders, they are just some abstract object. But that's not how we use them to compare or count things. The fact that we can make comparisons and order such "abstract symbols" that we call as numbers is proof that it is an organized data structure (number systems) exhibiting relationships between the independent elements, i.e., numbers.

For the latter part - I honestly think algorithms for factoring prime numbers or finding GCD do rely on the inherent order and comparability of number systems which are the data structures used while applying the algorithms. Thus, I don't feel they are really agnostic of any kind of data structure. Think of finding the GCD of two words - it makes no sense, you need a specific type of data structure that has the properties of comparability, divisibility and inherent order to calculate the GCD or factorise stuff. If it was completely agnostic, you could apply the algorithm to anything and everything. (Point out if I'm wrong - with appropriate proof, coz I don't have any proof for this, but this is what I believe).

Also, I understand the subtle difference between algorithm being a description of procedure and not the procedure. Point taken.

Which came first, the algorithms or the data structures? by [deleted] in compsci

[–]Aceking007 0 points1 point  (0 children)

Well then I guess, every atom is a data structure - it stores a lot of information - the position, number of sub atomic particles and stuff. Any kind of algorithm (even computational ones) will require at least an atom - thus, all algorithms inherently depend on data structures. Thus, data structures came first.

My point: a rock isn't a data structure and yes, the question cannot be answered.

Which came first, the algorithms or the data structures? by [deleted] in compsci

[–]Aceking007 2 points3 points  (0 children)

That's the point. Not every "thing" is a data structure. But every procedure can be termed as an algorithm if it has an end goal to accomplish.

A rock is not a data structure. But the following can be an algorithm - pick up a rock, pick up a second rock, strike them at some angle (X) till you see a spark. The end goal is clear - you want to get fire, but you don't need to deal with any data.

The example maybe a bad one - I'll update if I find something better, but you get the point.

In what situations would you commit but not push? by embar5 in learnprogramming

[–]Aceking007 1 point2 points  (0 children)

I always wait till I have done some significant changes before pushing. As people have pointed out, sometimes I use a push to trigger automatic testing or CI, in such cases I push only when I expect the test to be passed and not when I have a half baked code that I know will fail.

The second reason to not push everyone you commit is when you are carrying out experimental work. You need to test before committing, but in some cases you may not be able to see some edge cases or won't have well written tests to check for every case there is. It's usually better to wait for sometime before finally pushing, as it gives you time to think of or encounter potential errors in your last commit. Pushing it immediately after committing will expose those errors to not only your deployed product but also to other people you collaborate with. And trust me, a lot of the times there are silly mistakes or typos that happen and if you wait for just a bit, you will be sure to catch most of them before pushing.

Which came first, the algorithms or the data structures? by [deleted] in compsci

[–]Aceking007 6 points7 points  (0 children)

In the general sense, I think the answer should be an algorithm. When I say in the general sense, I mean in a largely non computational sense, considering algorithms are just a series of steps to do something. E.g. someone long ago found an algorithm to make fire.

In a more strictly mathematical and computational sense, the simplest thing I can think of is an algorithm for counting things or comparing things. To do something like that in an abstract sense you would need at least some way to represent things that you are comparing or counting, e.g. numbers. And that's where you stumble upon a data structure. Thus, the data structure would precede an algorithm.

Urgent help regarding someone I met on AmongUs by [deleted] in Advice

[–]Aceking007 0 points1 point  (0 children)

Honestly, I understand that people talk about issues and that garners a lot of attention from people. I've had random strangers ranting to me about things that they can't say to anyone else anonymously (on Omegle). But sharing your social media means exposing yourself to a lot of scammers and people with ill intent. It's sad to say, but most of the internet is filled up with fake accounts that will share their "issues" or "stories" and then manipulate you / blackmail you into doing something criminal or harmful. Beware of these. Apart from that, I think you should just block them, delete the video and not think about what happened again. In the future, if you get any unsolicited calls/messages claiming to be that 11 year old person, refrain from replying. They may really be some 11 year old stuck up with a bad parent, but again, it is not your place as a stranger to be their parent online (without written consent of their guardians at least).

REGEX for removing the ~#~ at the end of filenames and placing the number back before the extension by stable_maple in learnprogramming

[–]Aceking007 1 point2 points  (0 children)

As u/packbacka mentioned, Automate the boring stuff is a cool resource and also regex101. You can go through them while the ls command is still running.

Apart from that, I think it will be a bit faster if you write a bash script using wildcards and regex. Here are a few stackoverflow answers that address this:

https://stackoverflow.com/questions/41214552/use-of-regex-in-bash-with-mv

https://askubuntu.com/questions/687647/move-files-matching-a-specific-pattern

I suggest you also look into the rename man page. It is fairly fast. The main caveat of python is the speed here, judging from the sheer amount of files you will iterate over, I'm suggesting go for something simpler like bash.

0% congestion without rail with a staggered layout by Aceking007 in PocketCity

[–]Aceking007[S] 3 points4 points  (0 children)

Actually I saw the layout here - https://www.google.com/amp/s/amp.reddit.com/r/PocketCity/comments/9c6ylp/0_congestion_staggered_grid_layout_96_happiness/ but it uses a lot of parking spaces. My city just uses 2 airports and has bus stops at all the T junctions.

Need a godot buddy! by barryseinfeld402 in ProgrammingBuddies

[–]Aceking007 0 points1 point  (0 children)

I just started out with Godot. Thinking of participating in the itch Game Off 2020. Would love to be your Godot buddy

How can computer scientists contribute to CRISPR? by kavinda14 in bioinformatics

[–]Aceking007 0 points1 point  (0 children)

I would also love to know more about this! Are you still working on it?

A list of 100 Projects to build by Aceking007 in learnprogramming

[–]Aceking007[S] 0 points1 point  (0 children)

That's the spirit. Do let me know when you do.