Hacker News has run two companion threads every month for more than a decade: Who is hiring? for companies and Who wants to be hired? for job seekers. I pulled the top-level comment counts for both threads from 2015 through 2025 and set them against the Effective Federal Funds Rate. Here’s data from the LinkedIn Workforce Report. It correlates with the HN trend. Industry Jan 2023 Jan 2024 Oct 2024…
Great pizza recipe that can be made at home oven. Dough: 500ml warm water tbsp of sugar 2 grams of active dry yeast AND a tbsp of sourdough starter 20 ml truffle olive oil (regular is fine as well) 15g of salt 600g bread flour, plus more for working the dough (about 700g total for type 650, 750g for type 00) additional oil for greasing the dough whole wheat flour for dusting the pizza peel Sauce -…
To store my passwords I use a hybrid approach with Lastpass used as a password entropy storage. For important services, like Github, I only store half of the password in LastPass. Then I add a short random string and a generic short password. The final password is 12-16 random characters from LastPass + 3 chars that I generate from the service name (in my head) and a short 5 characters password.…
Here is a baggage checklist that I’ve been using for a few years Backpack or luggage Backpack Samsonite (55-45-20) suitcase Documents Passport Pen and photos for Visas Cash Clothing and shoes T-shirts Socks Underwear Hoodie Trousers Shorts Flipflops Tracking shoes Sandals Rain jacket/Umbrella Swimming shorts Pijamas Towel Accessories and Electronics Power adapter USB charger USB cable Mac charger…
There are many ways to compare two integers. One of them is to compare each bit of numbers e.g. comparing 2 and 1: 2 -> ...0010 1 -> ...0001 Two last bits are different, so the result is 2. Here is one of many possible implementations: public static int bitDiff ( int a , int b ) { int count = 0 ; for ( int i = 0 ; i < 32 ; i ++) { int aBit = ( 1 << i ) & a ; int bBit = ( 1 << i ) & b ; if ( aBit…
Sample code for printing java.sql.ResultSet ResultSet rs = statement . executeQuery (); ResultSetMetaData rsmd = rs . getMetaData (); System . out . println ( "querying SELECT * FROM XXX" ); int columnsNumber = rsmd . getColumnCount (); while ( rs . next ()) { for ( int i = 1 ; i <= columnsNumber ; i ++) { if ( i > 1 ) System . out . print ( ", " ); String columnValue = rs . getString ( i );…
TL;DR I made a small web app that sends the content of HTML 5 canvas directly to Facebook, without intermediate storage. It converts canvas UrlData which is base64 to png and posts it to user’s wall. Do you pine the days of Heroes of Might and Magic III? :) Amazing game. A few days ago I stumble upon a great post on Hacker News. I haven’t use AWS before so I was curious to try it out. I wanted to…
I was wondering how to use some cool font in my XNA game. I came up with an idea to draw white and black text with an offset to give it “3d” look. Here is the result: I made extension methods for SpriteBatch that write this kind of text public static class ExtensionMethods { /// <summary> /// Draws white text with a black stroke /// </summary> public static void DrawStringBlackAndWhite ( this…
The default parsing method for C# using current culture, which sucks really badly. ( I wrote about it on SO) Here a lil helper that I use public static class Helper { public static bool TryParseDouble ( this TextBox textbox , out double value ) { if ( double . TryParse ( textbox . Text , NumberStyles . Any , CultureInfo . InvariantCulture , out value )) { textbox . Foreground = Brushes . Black ;…
To answer this question, we need to know what kind of Operating System and architecture we are dealing with, the Standard and articles refers to “storage” or “space”. These are the most general terms and the only valid ones, unless we make a bunch of assumptions. For example: malloc allocates a block of Virtual Address Space on the heap This is not correct for many embedded systems. Many of them…