Top Tweets for #WeekendDevPuzzle
Had been missing the very gripping #WeekendDevPuzzle series that @amodm had started last year.
Thought I will try to make a few myself.
Here's one π if you'd like :)
Let's have some fun with concurrency.
Here is some example Go code
Basically just calculates the time taken to run a loop and prints it.
To slow down the loop, I calculate the time after every 10000 iterations, and in every iteration I divide two random numbers.
And this is what the output looks like. About ~150us per printed everytime I calculate.
When this runs, if I look at CPU usage I'll see that this program is using 100% of CPU (100% means it is using 1 core of the CPU 100% of the time)
Sounds about right?

My (delayed) response to the last puzzle in this series.I'll be pausing #WeekendDevPuzzle for now, until I build a good pipeline again.
https://t.co/iB2a7yuVuf
*You can find the full list of puzzles here: https://t.co/bs1yyHyy6m
Today's #WeekendDevPuzzle: You've written code to play an arcade style space shooter game on a computer. You put sensors to observe the screen & feed data to your program, which then sends signals to kb+mouse.
As speed of the game increases, what would become a bottleneck?
1/2
Today's #WeekendDevPuzzle: You've written code to play an arcade style space shooter game on a computer. You put sensors to observe the screen & feed data to your program, which then sends signals to kb+mouse.
As speed of the game increases, what would become a bottleneck?
1/2
In today's #WeekendDevPuzzle: You have a program that iterates over an (unordered) array of integers, to count how many of them are below a certain threshold. Pretty straight logic.
Both the array and and the threshold are provided at runtime (so, not hardcoded).
1/3
In today's #WeekendDevPuzzle: You have a program that iterates over an (unordered) array of integers, to count how many of them are below a certain threshold. Pretty straight logic.
Both the array and and the threshold are provided at runtime (so, not hardcoded).
1/3
We'll keep today's #WeekendDevPuzzle simple:
Scenario A: You have a set of web servers, sitting behind an LB (Load Balancer), and hit a DB for some of their requests.
LB has never gone down since deployment, while web servers have issues for ~3hrs per month, and DB ~1hr/mo
1/4

We'll keep today's #WeekendDevPuzzle simple:
Scenario A: You have a set of web servers, sitting behind an LB (Load Balancer), and hit a DB for some of their requests.
LB has never gone down since deployment, while web servers have issues for ~3hrs per month, and DB ~1hr/mo
1/4

In today's #WeekendDevPuzzle: Most modern programming languages have something called a "closure", usually closely coupled with lambda functions.
Can closures+lambdas be implemented irrespective of whether the language is garbage collected or not? Why/not?
1/3
In today's #WeekendDevPuzzle: Most modern programming languages have something called a "closure", usually closely coupled with lambda functions.
Can closures+lambdas be implemented irrespective of whether the language is garbage collected or not? Why/not?
1/3
Today's #WeekendDevPuzzle: You've attached a debugger to your pre-running program and set a breakpoint, but your debugger crashed before it was hit.
What happens to your program & why?
If your answer is "it depends", then on what?
1/2
Today's #WeekendDevPuzzle: You've attached a debugger to your pre-running program and set a breakpoint, but your debugger crashed before it was hit.
What happens to your program & why?
If your answer is "it depends", then on what?
1/2
Today's #WeekendDevPuzzle is a short one, given the holidays. While a CPU is waiting for data to load from RAM, is it seen as idle or busy by the OS? How does the "uptime" command in the unix world see this?
Bonus qstn: Implication of the above on Apple M1 Max Pro's performance?
In today's #WeekendDevPuzzle: what's your guess at relative CPU performance of a process running
A. natively
B. in a docker container on the same host
C. in a virtual machine on the same host
How would you compare their network performance? Memory performance?
1/2
Today's #WeekendDevPuzzle is a short one, given the holidays. While a CPU is waiting for data to load from RAM, is it seen as idle or busy by the OS? How does the "uptime" command in the unix world see this?
Bonus qstn: Implication of the above on Apple M1 Max Pro's performance?
Today's #WeekendDevPuzzle is a short one, given the holidays. While a CPU is waiting for data to load from RAM, is it seen as idle or busy by the OS? How does the "uptime" command in the unix world see this?
Bonus qstn: Implication of the above on Apple M1 Max Pro's performance?
In today's #WeekendDevPuzzle: You're building a JWT token issuer, which uses random numbers for some of its activities. The process will run on a Linux VM in the cloud, which runs no other server process. 1/2
In today's #WeekendDevPuzzle: You're building a JWT token issuer, which uses random numbers for some of its activities. The process will run on a Linux VM in the cloud, which runs no other server process. 1/2
In today's #WeekendDevPuzzle: You've been asked to sum a series of numbers in a matrix of 10k rows and 20k cols (each cell is int64). Which is faster?
1. Adding up the 3rd cell in each row?
2. Adding up the 5th row?
Depends on implementation? What factors determine outcome?
In today's #WeekendDevPuzzle: You've been asked to sum a series of numbers in a matrix of 10k rows and 20k cols (each cell is int64). Which is faster?
1. Adding up the 3rd cell in each row?
2. Adding up the 5th row?
Depends on implementation? What factors determine outcome?
In today's weekend dev puzzle: on what kind of code flows (or operations) specifically, do you believe a JIT JVM will perform better than a precompiled C code. Both running on x64.
You don't have to send me answers, but do share if you enjoyed mulling over this.
Last Seen Hashtags on Sotwe
cruisinggay
Seen from Italy
ΰΈͺΰΈ²ΰΈ£ΰΈΰΈ²ΰΈ‘ΰΈΰΈ±ΰΈΰΉΰΈ’ΰΉΰΈ
Seen from Thailand
thundr
Seen from Egypt
IloiloMasahista
Seen from United States
Young girls
Seen from United States
ζε±θ‘
εεγγͺηζΎι
Seen from Japan
cruising caught
Seen from Germany
nolimit #nolimit #momson
Seen from Algeria
baitedbait
Seen from United States
Trends for you
Most Popular Users

Elon Musk 
@elonmusk
240.4M followers

Barack Obama 
@barackobama
119.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Cristiano Ronaldo 
@cristiano
110M followers

Narendra Modi 
@narendramodi
107M followers

Rihanna 
@rihanna
97.5M followers

NASA 
@nasa
92.1M followers

Justin Bieber 
@justinbieber
90.8M followers

KATY PERRY 
@katyperry
87.3M followers

Taylor Swift 
@taylorswift13
81.2M followers

Lady Gaga 
@ladygaga
72.7M followers

Kim Kardashian 
@kimkardashian
69.6M followers

Virat Kohli 
@imvkohli
69.4M followers

YouTube 
@youtube
68.6M followers

Bill Gates 
@billgates
63.7M followers

The Ellen Show
@theellenshow
62.5M followers

Neymar Jr 
@neymarjr
62.1M followers

CNN 
@cnn
61.9M followers

X 
@x
60.9M followers

Selena Gomez 
@selenagomez
60.4M followers




