HNHacker News
TopNewBestAskShowJobs

m33k44

607 karma · joined December 19, 2018

submissionscomments
m33k44··on The future of web software is HTML over WebSockets
> There is a great deal of power in having your UI be a stateless function over a giant JSON object.

Something like this: http://jasonette.com

m33k44··on Actually Portable Executable
"The most compelling use case for making x86-64-linux-gnu as tiny as possible, with the availability of full emulation, is that it enables normal simple native programs to run everywhere including web browsers by default....I think we need compatibility glue that just runs programs, ignores the systems, and treats x86_64-linux-gnu as a canonical software encoding."

:)

Just a smiley, no other words!

m33k44··on Ask HN: Are most companies just making things needlessly complex and abstract?
Big companies develop tools and frameworks for their own requirements. Then they release it as open source so that they can get future employees who are already trained in those tools and framework without they investing in any training or rampup time.

Does a developer, who does not have the same requirements similar to the company that has released its internal tools, need to use those tools and frameworks? No, certainly not. Use something that you are comfortable with and not that is flavour of the month because some big tech company promotes it.

m33k44··on Now I know why I am procrastinating
> Get a better keyboard.

:)

It is not about the keyboard. If the mind is busy pacing ahead then it slows down the task at hand.

m33k44··on Ask HN: Working for US companies 100% remotely from Europe?
And how do you find your clients? What channels you use?

How did you find your first few clients?

Thank you!

m33k44··on Ask HN: How to increase SWE salaries in Europe?
It is about the mindset that needs to change for the SWE salaries to increase. I was working for a world leader in mobile space. The company was located in a place where there are lot of startups, big world leading local companies, lot of investment activity, US companies etc. The salaries are pittance in that area even though it is a major place of tech and innovation.

I will give you an example of what is the mindset of people(mostly HR) here. There were major changes going to happen at this company I was working for(we didn't know at that time, but came to know much later). The usual trick HR plays in these types of cases is to increase some perks to keep all employees "happy" so that they don't leave the company. So the HR of this company announced a perk via email, that the company will be providing "fruit bowl" to employees every day in the morning. Everyone was excited as there was no other means of eating at the office except for a small vending machine that delivered limited supply of sandwiches and a small coffee machine(did I mention that this company was a world-leader?). The day was announced for the "fruit bowl" perk. So on the day of the perk, when people came to the office they saw that a small bowl of fruits was kept in the "kitchen". There were 2-3 bananas, 2 pears, 1-2 kiwifruit, one apple and a bunch of grapes. One senior engineer who was with the company almost since its inception sent an angry email to the HR and CC'd it to the rest of employees at the office asking them how on earth this fruit bowl was going to be shared between 50+ employees at the office. The HR's reply was(again CC'd to everyone in the office) "But there are grapes"!

And I am not kidding you, I saw this type of "perks" being advertised in the country where I am. The perks are something like this:

"We provide our employees with lunch on Fridays" or "We provide our Employees lunch on first Thursday on the month" etc. What are engineers, beggars? But that is common in companies that are founded in the country where I stay. When I moved to an US founded company in my country, not only did my salary increase substantially(by local salary standards) but the perks were something like this:

Breakfast, Lunch, Pizza if had to stay late, unlimited supply of coffee, onsite postal service, onsite laundry, haircut, manicure, shoe-polish, ironing service, on-site shop for snacks, payment for car fuel(extra pay if the car was environment friendly), 24-7 access to free gym at the Marriot, discounted shopping coupons and the list goes on. And this was not FAANG!

The reaon this is happening is because(I learnt this indirectly), the local companies collaborate, in partnership with recruitment agencies, behind the scene to not only keep salaries low but to share the information with HR that someone is looking for a job or has interviewed at some other company.

In the US, if I am not mistaken, there was a very famous litigation that forced US companies to stop collaborating in artificially keeping salaries down and deliberately not hire from certain companies. This is not there in Europe I suppose.

m33k44··on For years, Intel sat on its CPU monopoly and now the tide turns against them
> It was all Politics.

And this has trickled down since.

m33k44··on For years, Intel sat on its CPU monopoly and now the tide turns against them
Intel has an internal systemic problem. The company is run for shareholders, and it is run by sales, marketing and HR teams. The engineers have become second-class citizens, hardware engineers and then at the bottom of the pile are software engineers. When an engineering company is run by a sales-marketing-hr combo, whatever you do it is not going to have better outcomes. Intel is surviving because of achievements of it's founders. They are still reaping the benefits of that. The question is how long!
m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
> So how do you revoke sessions?

Because the token is generated per request, there is no requirement to revoke the token. Each request is a session in itself. The private payload of the token contains the username if the user was authenticated, else that information is not present in the token. That gives an indication to the server that the request is from already authenticated user.

> There’s no way to logout or invalidate sessions?

A logout request from user will contain the token that was sent in the response to previous request from that user. Because the token is generated per request, the way the server can "invalidate" a session is by simplying logging out the user by removing the username from the next token. If a token is compromised then that will create a problem for that single request because the next token will be different and will be using a new key for encryption.

> I’m not sure what you mean by stateless server.

Stateless means the server does not have to maintain session information.

m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
> You need to implement expiring tokens that are refreshed, otherwise there’s no way to revoke a token.

I create a new token for each request. Store expiry time and ephemeral id in the token and the cookie, set a separate ephemeral session cookie. Then on the server side check the expiry time and then cross-check the id stored in the token to the one in the session cookie. And then in response to the request generate a new token with a new id and expiry time.

> check the DB to see if the session is still valid

I am trying to build a stateless server. But I am trying to understand the advantages and disadvantages of stateless and stateful way of managing web sessions.

m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
> If you are doing a MPA, I would only use a session cookie and set the secure only flag as well as the same origin flag for the cookie.

I am doing an MPA. I am setting a session cookie, the secure only flag and the origin flag. But I am using JWT to store the ephemeral session id which is then compared on the server-side to the session cookie as a cross-check. A new JWT with new id is created for each request. That way the server remains stateless and the client gets new token back for each request; this token is then used in the next request. The only question I have is what are the disadvantages of doing this i.e. making each request independent of the other requests and then cross-checking the validity of incoming request by comparing id stored in the JWT with the one stored separately in another cookie.

> Httpd is pretty hardened and they are plenty of auth solutions for it, if you are using it.

I am not using httpd.

m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
> I'd go further and say don't write your own login system at all if you don't have to.

Do you mean login using google, facebook etc?

I don't want to use third-party login services. Are there any pre-built self-hosted systems for this?

m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
I am just storing ephemeral id and username in JWT and put the encrypted id in a separate cookie.
m33k44··on Ask HN: Web developers on this forum, how do you manage user sessions?
> I assume you mean JWT

Yes.

> JWT/cookie page rendered stuff is fine

Please could you elaborate on this?

> And use HTTPS for all traffic.

Yes, that is done.

> unless this is a comp-sci quiz question testing your understanding of sessions/security, haha

No it is not :)

m33k44··on Ask HN: C++ Dev Jobs Are Rare, Aren't They?
It is not that C++ jobs are rare, but the expectation of companies recruiting C++ engineers is either too high(i.e. they expect C++ gurus with domain expertise) or too low(i.e. they expect interns). There is no role for generalist C++ engineers. If you look for C++ jobs, then most of them mention foremost the domain expertise such as AI, Games, Finance, Crypto etc as a requirement and C++ as secondary requirement. Hence most of the companies struggle to recruit C++ engineers.
m33k44··on Which is the stack you usually use to start your side projects?
Wt/C++ for the backend and templating, jQuery+Bootstrap* for the frontend and PostgresQL for database.

* https://www.webtoolkit.eu With Wt there is no requirement for Bootstrap and/or jQuery though.

m33k44··on Not quite a car, not quite a motorcycle: a vehicle built for one
In India there was one built by a company Reva[0]. Looks like it was not able to gain mindshare.

[0] The founder explaining the car: https://www.youtube.com/watch?v=3sDwGazHefM

m33k44··on Second-Guessing the Modern Web
What frameworks do you use?
m33k44··on Ask HN: Can you help me remember the name of a programming language?
Was it interpreted, compiled? Was it functional, imperative, logic oriented language?
m33k44··on Ask HN: What are the pieces of software that may last forever?
Hello World examples.
m33k44··on Ask HN: How to get Bill Gates's attention?
I have heard of a healthtech startup in Cambridge, UK that is supported by Bill and Melinda Gates Foundation. The company is simprints(https://www.simprints.com). Contact the founders of that company. One of them is Alexandra Grigore (https://www.linkedin.com/in/alexandra-grigore-8aa20186)
m33k44··on Ask HN: How to get Bill Gates's attention?
In the last AMA on Reddit he did provide information about the people to whom he listens. I am posting the link to the AMA again here: https://www.reddit.com/r/Coronavirus/comments/fksnbf/im_bill...

Dr. Trevor Mundel[0], who leads the Gates Foundation’s global health work, and Dr. Niranjan Bose[1], Bill Gates' chief scientific adviser.

[0] https://www.gatesfoundation.org/Who-We-Are/General-Informati...

[1] https://www.linkedin.com/in/niranjan-bose-014b00

m33k44··on Ask HN: How to get Bill Gates's attention?
I read somewhere that Bill Gates is very active on social media e.g. Reddit and Twitter. Here is one of the AMAs he did on Reddit: https://www.reddit.com/r/IAmA/comments/5whpqs/im_bill_gates_...

A recent AMA related to covid-19. There are references to his team and adviser: https://www.reddit.com/r/Coronavirus/comments/fksnbf/im_bill...

His Reddit handle is: https://www.reddit.com/user/thisisbillgates His Twitter handle is: https://twitter.com/BillGates His blog is: http://www.gatesletter.com

If you search, you will also easily find his email address online. He has multiple email addresses as per online searches.

HTH

m33k44··on Ask HN: Which open source project's C++ code is pleasure to read?
Which of these projects have code that is easy and pleasurable to read?
m33k44··on 100 more open-source UI designs uploaded
Thank you for the insightful reply!
m33k44··on 100 more open-source UI designs uploaded
Just out of curiosity, do you have a design for a complex responsive form? For example, how would you go about designing a form that have, say, 40 feilds such as text boxes, dropdown lists, date and time picker, file upload fields, radio buttons, check boxes, tables etc that works on both desktop and mobile browsers?
m33k44··on Ask HN: I lost my job
> "I believe I was expected to perform as a leader on top of solving problems, writing applications and my lack of leadership skills made me not worth my paycheck. In retrospect, higher ups did mention in passing about an year ago about how I need to speak up in meetings etc."

I think this needs to be resolved across industry. The so-called "leadership" should learn that not all fingers are equal but every finger has use and value. Similary not every employee can be a leader and extrovert. It is the leadership's responsibility to identify and make use of "silent souls" on a team to greater effect. In my career I have seen people who are introverts to be very capable when given a right environment; in fact they exceed others on the team. Forcing people to be what they are not is not a good leadership practice.

m33k44··on Ask HN: How do software platforms ensure money is transferred to lender?
No, I am not describing payment gateway. I am talking about ensuring that a lender is paid by the borrower in future. The example I gave was of selling invoice/receivable. A borrower sells invoice to a lender. Once the invoice is paid by the customer of the borrower, then how does the software platform ensure that the money received from the customer goes to the lender and not to the borrower? Is it the responsibility of the borrower to transfer the money to the lender? What if the borrower does not transfer the money to the lender? Is the software platform responsible for that? In that case, how does the platform force the borrower to payback to the lender?
m33k44··on Project idea to reduce student fees and increase teacher's income
Will this require government approval?
m33k44··on Ask HN: I am going into autopilot mode What do I do?
Well, even Ramanujan claimed that the Goddess of Namagiri use to give him mathematical solutions. You are in a good company!
← PreviousPage 4 of 6Next →