-
8 votes
-
Primality test using regex
9 votes -
Remote code execution vulnerability in the cdnjs Javascript CDN run by Cloudflare, which could have enabled tampering with over 10% of all websites
18 votes -
Hashing Phone Numbers For 2-Factor Authentication
7 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
5 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
9 votes -
TigerBeetle - a million financial transactions per second in Zig [group talk]
4 votes -
Kaspersky Password Manager had multiple problems in its password-generator, resulting in its passwords being predictable and easily brute-forced
21 votes -
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema: ```sql CREATE TABLE article_to_warehouse ( article_id INTEGER , warehouse_id INTEGER ) ; ``` How do I add a `UNIQUE` constraint?
5 votes -
KeenWrite 2.2.0: Curl straight quotes upon export
4 votes -
Using John the Ripper To Crack Password Hashes
3 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
10 votes -
The Internet Is Rotting - The glue that holds humanity’s knowledge together is coming undone
9 votes -
GitHub Copilot - Your AI pair programmer
20 votes -
Leveling up networking for a multi-game future
5 votes -
Oildrop - A self-auditable userscript manager
13 votes -
Whatever happened with UMN vs. Linux Kernel Maintainers?
Even tech news moves a bit too fast for me to keep up. Did UMN ever get unbanned? I saw a half-hearted apology and then finally this [1], but never heard any update. Most recent article I've seen...
Even tech news moves a bit too fast for me to keep up. Did UMN ever get unbanned? I saw a half-hearted apology and then finally this [1], but never heard any update. Most recent article I've seen is this ZDNet article [2] from a couple of weeks ago discussing a related issue, but still mentions that UMN is still banned.
Anyone following this?
[2] https://www.zdnet.com/article/hard-work-and-poor-pay-stresses-out-open-source-maintainers/
4 votes -
Chinese Academy of Sciences releases "Xiangshan", a high performance open source RISC-V processor that runs Linux
7 votes -
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema: ```sql CREATE TABLE article_to_warehouse ( article_id INTEGER , warehouse_id INTEGER ) ; ``` How do I add a `UNIQUE` constraint?
7 votes -
Fun and dystopia with AI-based Python code generation using GPT-J-6B
7 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
12 votes -
Herding in an Artificial Life Evolution Ecosystem Simulation | Boids Algorithm Implementation
3 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
13 votes -
An exploration of the types of subclassing and when inheritance is a good choice compared to composition, through the lens of Python
4 votes -
Your CPU may have slowed down on Wednesday
10 votes -
Libera Chat vs. Freenode: Who won?
Let me start by saying this is a space I am not at all familiar with. I didn't grow up with IRC, my first text editor was Sublime (I'm not from the "EMACS vs. VIM" generation,) so I feel kinda...
Let me start by saying this is a space I am not at all familiar with. I didn't grow up with IRC, my first text editor was Sublime (I'm not from the "EMACS vs. VIM" generation,) so I feel kinda outta touch with what all is going on.
Is there a winner? I feel invested in this topic after seeing a whole slew of posts, blogs, and medium articles posted all over Reddit and HN breaking down how these folks have personally been impacted over the past month or so. It seems to have died down which leaves me with the question of what the outcome was. An even 50/50 split? Libera destroying Freenode? Or Freenode able to hold onto users by successfully preventing efforts to organize a transition?
Without being in the Freenode community, I don't have a feeling for whether Freenode is dead, Libera Chat is "winning" and I don't think there's a good way to get metrics either.
Anyone in this world who can help the uneducated out on the outcome of all of this?
15 votes -
NLnet Foundation open call for funding (NLnet funds open source projects)
6 votes -
Simplifying Grammar Checks for Manuals
2 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
11 votes -
Announcing MonoGameJam3
5 votes -
Continuing My Education with a CS Degree in Canada [A Help Thread]
My Goal I am applying to Canadian universities for fall admission as a CS major. This will be my second degree, and one of the requirements of getting admitted for a second degree is to show that...
My Goal
I am applying to Canadian universities for fall admission as a CS major. This will be my second degree, and one of the requirements of getting admitted for a second degree is to show that you have a significant interest in the subject. My plan is to get online certificates to show that I am actually dedicated to learning CS and getting a job in the field. I am actually dedicated, I just need a way to show it on paper. I have some experience with software development (only the basics), but there aren't any records of it since it was just informal study.
My Problem
I can't decide which certificates I should pursue. I am torn between EdX and Udemy. I would Tilderinos' help in choosing between the two. I would also appreciate any general advice you may have.
Here are the courses I plan to take on EdX (prices in USD):
UBC's MicroMasters Program in
Software Development - $832Harvard CS50's Web Programming with Python and JavaScript - $199
IBM's Professional Certificate in
Cloud Application Development Foundations - $169Here are the courses I plan to take on Udemy:
The Ultimate 2021 Fullstack Web Development Bootcamp - $15
The Complete 2021 Web Development Bootcamp - $15
The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert - $30
Angular - The Complete Guide (2021 Edition) - $15
Comparisons
To reiterate, I have two goals going into this. One is to actually learn web development, since I would like to become a fullstack developer (but my options are semi-open). The other is to prove to the Canadian universities that I am dedicated to learning and to give myself an edge over applicants.
If I go with EdX, then I have to pay a much steeper price for the certificates. These courses also take a long time to get through and the projects don't seem as relevant to real word applications. But I will also be learning from established institutions like Harvard and UBC. EdX certificates also come with the distinct advantage that a human is checking the problem sets you submit. This will show the Canadian universities that I have actually spent the time and effort to go through the courses and pass them.
If I go with Udemy, I will get through the courses in less time and their projects seem more related to real world projects. If I go through the courses faster, I will also have more time to start on some personal projects, and I can show my dedication to learning through those projects. Personal projects and also volunteer work will also help establish a resumé for future work. The courses on Udemy are a lot cheaper too. But they don't have the same level of verification or prestige that EdX does.
So in summary, EdX has prestige and quality courses, but a steep prices and a huge time commitment. Udemy is cheaper and gives me more opportunities to do personal projects and volunteer work, but it's certificates aren't fully trustworthy from the Canadian universities' perspective.
Final Words
What do you think? Which path should I take?
For those of you wondering, why I am going to university instead of a bootcamp, it's because I plan to immigrate to Canada and becoming a student seems the straightest way of getting PR. I need to leave my third world country as soon as I can, for mental health and economic reasons. I have been mostly unemployed ever since the pandemic started so I can't get work in Canada (or the U.S.) on my first degree (a management degree). I already tried that route. I can't find proper work here either.
Also, I am sorry if I posted in the wrong group, or if I shouldn't have posted it anywhere at all. I desperately need advice on what to do and I don't have a trustworthy network here that can help me through this. I'm sorry and thank you for your help.
8 votes -
GNOME - Community Power Part 1: Misconceptions
4 votes -
write freely (a federated blogging platform ) releases version 0.13.0
9 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
13 votes -
Obfuscating "Hello world!" in Python
7 votes -
Attempting to use a software engineering approach to win at chess against my brother—and only my brother
10 votes -
Reasons why bugs might feel impossible to understand
4 votes -
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema: ```sql CREATE TABLE article_to_warehouse ( article_id INTEGER , warehouse_id INTEGER ) ; ``` How do I add a `UNIQUE` constraint?
4 votes -
On password managers
11 votes -
Enhancing Photorealism Enhancement
11 votes -
Reflections on the OVH datacenter fire, and the consequences it had for the Pijul project
6 votes -
Cores that don’t count
8 votes -
Stack Overflow has been acquired by Prosus for $1.8 billion
20 votes -
Why does a completely local, self-contained html file need to access gstatic.com?
So, I'm a privacy advocate (or paranoiac, depending on your perspective). I run both uMatrix and NoScript plug-ins (among others) in my Firefox browser, so I can see when and where websites send...
So, I'm a privacy advocate (or paranoiac, depending on your perspective). I run both uMatrix and NoScript plug-ins (among others) in my Firefox browser, so I can see when and where websites send calls out to other locations, and block the ones I want ... google analytics, google fonts, google-apis, google tag manager, and gstatic are all ubiquitous out there, probably 99% of websites use at least one of them (PS: Tildes is in the 1%; yeay, Deimos).
And note ... there may well be nothing at all wrong with any of those sites/services ... but Google has a global all-encompassing Terms and Conditions policy that says, you use anything of Theirs, and They are allowed to harvest your personal data and make money off of it.
And I do not accept those terms.
Okay, that's the prologue. The deal is, I have a small piece of documentation, just basic "how to use this" info, for a WordPress plug-in. It is in .html format, with bundled bootstrap and jquery and a few other assets.
Nothing, anywhere in the entire folder, references gstatic. And yet when I open this local, on-my-computer-only html file ... my browser tells me that it is trying to connect to gstatic.com.
Anyone happen to know why/how that is happening?
4 votes -
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
10 votes -
GPT-3 tries pickup lines
7 votes -
Interview with GloriousEggroll, project maintainer of ProtonGE (a fork of Valve's Proton compatibility layer for Linux)
10 votes -
Coding Adventure: Terraforming
10 votes -
Microphone Audio Spectrogram
2 votes -
A few easy linux commands, and a real-world example on how to use them in a pinch
This below is a summary of some real-world performance investigation I recently went through. The tools I used are installed on all linux systems, but I know some people don't know them and would...
This below is a summary of some real-world performance investigation I recently went through. The tools I used are installed on all linux systems, but I know some people don't know them and would straight up jump to heavyweight log analysis services and what not, or writing their own solution.
Let's say you have request log sampling in a bunch of log files that contain lines like these:
127.0.0.1 [2021-05-27 23:28:34.460] "GET /static/images/flags/2/54@3x.webp HTTP/2" 200 1806 TLSv1.3 HIT-CLUSTER SessionID:(null) Cache:max-age=31536000
127.0.0.1 [2021-05-27 23:51:22.019] "GET /pl/player/123456/changelog/ HTTP/1.1" 200 16524 TLSv1.2 MISS-CLUSTER SessionID:(null) Cache:
You might recognize Fastly logs there (IP anonymized). Now, there's a lot you might care about in this log file, but in my case, I wanted to get a breakdown of hits vs misses by URL.
So, first step, let's concatenate all the log files with
cat *.log > all.txt
, so we can work off a single file.Then, let's split the file in two: hits and misses. There are a few different values for them, the majority are covered by either
HIT-CLUSTER
orMISS-CLUSTER
. We can do this by just grepping for them like so:grep HIT-CLUSTER all.txt > hits.txt; grep MISS-CLUSTER all.txt > misses.txt
However, we only care about url and whether it's a hit or a miss. So let's clean up those hits and misses with
cut
. The way cut works, it takes a delimiter (-d
) and cuts the input based on that; you then give it a range of "fields" (-f
) that you want.In our case, if we cut based on spaces, we end up with for example:
127.0.0.1
[2021-05-27
23:28:34.460]
"GET
/static/images/flags/2/54@3x.webp
HTTP/2"
200
1806
TLSv1.3
HIT-CLUSTER
SessionID:(null)
Cache:max-age=31536000
.We care about the 5th value only. So let's do:
cut -d" " -f5
to get that. We will alsosort
the result, because future operations will require us to work on a sorted list of values.cut -d" " -f5 hits.txt | sort > hits-sorted.txt; cut -d" " -f5 misses.txt | sort > misses-sorted.txt
Now we can start doing some neat stuff.
wc
(wordcount) is an awesome utility, it lets you count characters, words or lines very easily.wc -l
counts lines in an input, since we're operating with one value per line we can easily count our hits and misses already:$ wc -l hits-sorted.txt misses-sorted.txt 132523 hits-sorted.txt 220779 misses-sorted.txt 353302 total
220779 / 132523 is a 1:1.66 ratio of hits to misses. That's not great…
Alright, now I'm also interested in how many unique URLs are hit versus missed.
uniq
tool deduplicates immediate sequences, so the input has to be sorted in order to deduplicate our entire file. We already did that. We can now count our urls withuniq < hits-sorted.txt | wc -l; uniq < misses-sorted.txt | wc -l
. We get49778
and201178
, respectively. It's to be expected that most of our cache misses would be in "rarer" urls; this gives us a 1:4 ratio of cached to uncached URL.Let's say we want to dig down further into which URLs are most often hitting the cache, specifically. We can add
-c
touniq
in order to get a duplicate count in front of our URLs. To get the top ones at the top, we can then usesort
, in reverse sort mode (-r
), and it also needs to be numeric sort, not alphabetic (-n
).head
lets us get the top 10.$ uniq -c < hits-sorted.txt | sort -nr | head 815 /static/app/webfonts/fa-solid-900.woff2?d720146f1999 793 /static/app/images/1.png 786 /static/app/fonts/nunito-v9-latin-ext_latin-regular.woff2?d720146f1999 760 /static/CACHE/js/output.cee5c4089626.js 758 /static/images/crest/3/light/notfound.png 757 /static/CACHE/css/output.4f2b59394c83.css 756 /static/app/webfonts/fa-regular-400.woff2?d720146f1999 754 /static/app/css/images/loading.gif?d720146f1999 750 /static/app/css/images/prev.png?d720146f1999 745 /static/app/css/images/next.png?d720146f1999
And same for misses:
$ uniq -c < misses-sorted.txt | sort -nr | head 56 / 14 /player/237678/ 13 /players/ 12 /teams/ 11 /players/top/ <snip>
So far this tells us static files are most often hit, and for misses it also tells us… something, but we can't quite track it down yet (and we won't, not in this post). We're not adjusting for how often the page is hit as a whole, this is still just high-level analysis.
One last thing I want to show you! Let's take everything we learned and analyze those URLs by prefix instead. We can cut our URLs again by slash with
cut -d"/"
. If we want the first prefix, we can do-f1-2
, or-f1-3
for the first two prefixes. Let's look!cut -d'/' -f1-2 < hits-sorted.txt | uniq -c | sort -nr | head 100189 /static 5948 /es 3069 /player 2480 /fr 2476 /es-mx 2295 /pt-br 2094 /tr 1939 /it 1692 /ru 1626 /de
cut -d'/' -f1-2 < misses-sorted.txt | uniq -c | sort -nr | head 66132 /static 18578 /es 17448 /player 17064 /tr 11379 /fr 9624 /pt-br 8730 /es-mx 7993 /ru 7689 /zh-hant 7441 /it
This gives us hit-miss ratios by prefix. Neat, huh?
13 votes