Details
-
SkillsJava, C, C++
Joined devRant on 6/18/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@CodeMonkeyG while it is true that clean, understandable code without comments is much better than obscure code with comments, it is also helpful to document the general purpose and sometimes pre/post-conditions of library functions. On the one hand, to formally describe possible inputs/outputs, error codes, etc., and on the other hand, for automatically generated documentation, because not everyone will have the source code available for reading.
-
And L2 caches are getting close (on consumer CPUs, I guess workstation/server CPUs may already have ones thst big)
-
@HampusMa true, if sudo does not work, it means you are using windows (god bless you in that case)
-
My 2 cents: https://learnxinyminutes.com
It is great to get a basic overview, then just google examples of how to do something in that language. -
Actually, if I renember correctly, ubuntu has
alias l=ls by default on bash. I eventually moved to zsh, and ported all the aliases there, so I still use it. One "l" for normal ls, and "ll" for "ls -alh". Plus sone shit to show colors correctly, and sort folders first, and other random ls flags that I just cannot remember. -
@netikras yet I still press Ctrl+S at least twice each line I write, from pure habit (and a good one, I consider). So yeah, I would be pretty fucked, 99% wouldn't even compile...
-
@mogspls if the name of the folders end with ".log" and you have SSH'd into the machine, and CD'd into the folder containing the folders to delete, you could just "rm -rf *.log". However, make sure no other file ends with .log, because that command will remove all files and directories (that are inside the current directory) whose name end with .log.
In this case, you mention they are empty. Therefore, a safer option would be to use rmdir, which only removes empty directories. So, the command would be "rmdir *.log" -
Too round of a file size to be something real. Probably jusr random garbage
-
Wait until they add "let" too!
-
Apple has it's own protocol (if I remember correctly, just shorting the data lines) to charge iPhones faster. It does make some sense, because some phones are not ready to get more current, and if they do, they probably implement QuickCharge, so plug them in the wall and you canget even more power than 5V/2A.
(Not an apple fan by any means, quite the opposite tbh) -
@powerfulparadox I think it did make sense in the typewriter era, however, nowadays it makes no sense to separate both.
On a computer, you rarely do \n without a \r, and if you need to do it, you can use ASCII escape sequences to position the cursor right where you want.
On top of that, on linux you can use \r in the same way you can on windows, it is only \n that changes. -
@GyroGearloose nothing really useful, apart from a TV remote repeater for my mother. Just playing with different microcontrollers and modules.
-
@trollonaboat For now a clock, although I do have 6 of them, so a calendar would also be possible. The ICs to drive them with the arduino have not arrived yet, so not much I can do for now, but I will definitely experiment a bit.
-
@d02d33pak just like everything pretty much, ebay ;-)
-
I tend to use Vim for all text file editing including some source code, but for larger projects, the smart completion an IDE gives is really helpful. And you can always configure automatic deployment through SSH (SCP) if you have to run it remotely
-
Neural networks = Matrices + Statistics
-
@FrodoSwaggins I consider myself against Apple for two main reasons:
1. Devices are heavily overpriced.
2. Closed source on everything.
EXTRA. Lack of free apps, and developers have to keep paying 99$/year
I admit it, apple makes great products, with great integration between them, and good software long-term support. However, I prefer a good bang for the buck, over a device that costs as much as a new gaming laptop. -
@crapped Google 20, SO 10... What did developers search for, for 10 years!? That must have been a dark period...
-
For me it depends.
On the one hand, if I have to pick what lines I want to commit instead of the whole file, using an IDE is really useful, because you can see the diff with good syntax highlighting.
However, if I just changed a couple of files, and want to commit all the changes, it is easier to use the cli in my experience.
(For GUIs in IDEs I use JetBrains IDE's Git integration) -
@RantSomeWhere @Benedikt yeah, the Arch Linux Wiki is by far the most complete resource for anything linux related. It is true that there are some things specific to arch, but since arch is very bare bones, it has explanations that can be applied to most distributions.
askubuntu.com and unix.stackexchange.com are quite good too, although they are not in the form of an encyclopedia, but to answer more specific questions. -
@jAsE you can get rather big SSDs quite cheap nowadays. And still, if you want to take advantage of the low price/capacity ratio of HDD, you can have a 512GB SSD with a couple TB HDD. You get the fast speed for the OS, games, development or whatever you would like to speed up, while having the HDD to store bigger files that do not need as much speed, like movies, music, cat pictures, backups etc.
Also, SSDs have become much more durable in the last years in regards to read/write cycles.
Definitely give them another try. -
@SgnfcntOverflow Oh yes, I always forget the golden ratio!
-
@Condor oh wow, it looks really good, is quite cheap, and most of all, your recommendation is a good selling point. I will save it to my wish list, do some research, and post a rant or two when I make up my mind
-
@k0pernikus exactly. Imagine for example you have a program that, for some reason, needs to calculate fibonscci numbers every so often. Would you rather implement a clean recursive algorithm, a more efficient recursive one, or either of them with some sort of caching? Well, the clean code has the good mantainance, but is not efficient. The iterative one is more efficient, but not as much as the cached one, and is not as clean as the recursive. The cached recursive would seem the best, however, it has a memory impact, and in an embedded situation that might be an issue. Always have to take some trade-offs
-
@Condor never though about using the heatsinks actually, mught be worth. Anyway, my iron is quite bad, so it only has a (very loose) potetiometer that controls the power, not the temperature, and doesn't even have universal tips. I definitely have to look for a better one.
-
@Condor I love GreatScott too, he is quite inspirational. I need to get a good soldering iron/station, mine is just a cheap 60W chinese iron, and although it does do the job, it struggles with larger pads and ground planes. Also, I am gathering the resources to build an 8 bit computer kind of following Ben Eater's series, with some improvements I am designing, which should be quite a challenge.
-
I would just print to standard error ;-)
-
@rsync In my case, as a hobbyist (much much less than @Condor), I just learnt by practice. Lots of practice. I just look for kits on ebay, and build them. You can find them as cheap as 99¢ (or cheaper on auctions).
Also I like to desolder lots of things, which is a good practice too. -
📌
-
I heard you can build balloon-exploding lasers with the dvd laser, which I would say quite worth throwing one (or a couple) away 😉
And taking into account you like DIY electronics, you might be interested.