News for hackers. Stuff that matters.

frogcoder

Re:Patrick Stewart has died on Thursday October 29, 2026 @10:48PM (#50299304)
I get that the black banner is often for paying tribute to people who contribute significantly to science and technologies. But I feel he touched so many scientists and engineers that he deserve a black banner here. I am sad.
Re:Catch a Bird – I made it for my own sanity on Thursday October 15, 2026 @12:03AM (#50098995)
Wow! This is happy twitter.
Sorry, ties, as CCP party committees inside private firms. And in case of Temu, it also has a data-sharing agreement with People's Daily [1], a CCP controlled media group.

Just image having a mandatory political party inside every American corporation which the board has no control over.

1. https://www.washingtonpost.com/national-security/2024/05/01/...

Re:'Your Frustration Is the Product' on Thursday March 19, 2026 @08:08PM (#47448385)
Use uBlock Origin plugin instead. It sources from various block lists to block contents. Works great on most sites, youtube among them.
Re:Where things stand with the Department of War on Friday March 06, 2026 @08:18AM (#47274570)
Yes, there are many plus sides if USA were taken over by China.

1. You will see no protest on the street.

2. You will see no homeless on the street.

3. You will hear no more school shootings or any shooting.

4. No more tech companies conflicting with the government.

5. No one will sue the government because it's perfect.

6. All bad people will disappear.

7. Everyone sings praise of the government.

This is better than Utopia, you should pursue it.

Re:TikTok preparing for U.S. shut-off on Sunday on Wednesday January 15, 2025 @09:59PM (#42720540)
Everybody knows movies are staged, even the ones that are "based on a true story". From what I can tell, people seem to think those short videos are genuine.
Re:China to Build Thorium Molten-Salt Reactor in 2025 on Monday December 30, 2024 @09:53PM (#42555929)
Is this why China is such a great and technically advanced country?
I prefer to skip straws for most drinks except for bubble tea. Sucking up all those tapioca balls along with the tea is the whole point, otherwise it wouldn't be bubble tea.
Working from 9 to 9 six days a week
I've been organizing my python projects starting with package folders.

Say I name my package "foo", foo is the top level folder for the source code. Inside foo there is a "main.py" file as the project's start point, and other various modules, let's have one called "module1.py". Now, add another package under "foo", the obvious example name here would be "bar", and add another module under "bar" called "module2.py".

The project structure looks like this:

  - foo/
    |- main.py
    |- module1.py
    |- bar/
       |- module2.py
To reference "module1.py" in "module2.py", just write

  import foo.module1
To reference "module2.py" in "main.py", do as follows

  import foo.bar.module2

There is no problem importing from any level.

To start the program from command line, enter:

python -m foo.main

Well, again it depends on the culture. Some boss wouldn't take any disagreement from subordinates well. No matter what the result looks like, if the boss doesn't declare the project failed, than that's not a failure. Even if it failed, the subordinate takes the blame, it's less serious than bringing up issues early because the boss's order is faithfully carried through to the end.
I was expecting a sad ending after six years. Glad it turns out well.
Re:IsOdd (and IsEven) as a Service on Sunday February 26, 2023 @11:40PM (#34953020)
This service is lacking a major feature and too complicated!

Almost half of the time, I need to know if a number is even. Why doesn't it provide an end point for that?! Don't even tell me about the 409 status code. Am I suppose to know it's an even number when it returns an odd number to me? I only recognize status code 200, all other are errors, don't make this so complicated!

Start with something you can handle. Which language doesn't really matter but keep in mind that are so many possibilities. When you are comfortable with your first language, try some other, preferably with a different paradigm. It's totally fine using one language for development most of the time, just remember there are so many ways to accomplish one task.

The age does not matter as long as you can sit down and code. You don't see many old people doing programming because it's simply not many there. Computing is relatively new. It's obvious most people entering this field would be young, older people might require a change of career hence less incentive.

Re:Ask HN: Do you make decisions like its your company? on Wednesday February 15, 2023 @11:57PM (#34815226)
Disclaimer: I was never at any position close to like Sr. Director at a fortune 100 tech giant, maybe your company is different.

I use to act as if I own a large stake of the company I worked for, regretting it much later when I realized I was doing too much and knowing too little.

I was just kidding myself pretending as an owner of the company therefore investing too much emotion and work into it. Why would I pretend something that is not true? It's not like fake it until you make it thing.

I do not know how much you know about your company, but I was an outsider that knew nothing about the inner workings and secrets about it. I thought I knew, that's the kidding myself part.

Unless you are a real owner, you are just a cog in a machine. If you perform well, you will be rewarded well as a cog in a machine not as an owner. Most decisions you make would not affect the overall situation. Just do your job well and try to spend time with something else you care after work, not something you have no control of.

Ask HN: One of our Azure accounts was hacked how to negotiate the bill

Usually our monthly fee won't exceed 1,000 dollars. We discovered last month's bill is almost 3,000, and for this month up till now it's already over 200,000.We collected the evidences and filed police report. The bill is paid through a distributor, anything we ask about the reduction of payment, the distributor just passes it on to Microsoft. I feel if we don't find a way to talk to...

( Read More... | 76 comments | 2 points | on HN )

Ask HN: Do you use foreign keys in relational databases?

I use foreign keys quite often in my schemas because of data integrity, while my colleague has a no FK policy. His main argument is difficulties during data migrations which he frequently encounters. He rather have a smooth data migration process than having an unexpected error and abort the whole operation that the migration is only a small part of. I suspect the errors might be mainly...

( Read More... | 244 comments | 188 points | on HN )
Re:Notepad++ v8.4.3: Unhappy Users' Edition on Friday July 08, 2022 @08:24AM (#32026290)
Guess the author thinks Confucianism is bullshit (fart). I APPROVE!

The sample image of the first feature is Confucianism surrounded by the fart character. The feature highlight only one found entry per line. That is what you get when you search for fart.

Re:Ask HN: CS grad who barely knows any CS on Tuesday June 14, 2022 @08:42AM (#31738474)
Most of newly graduates of any subject don't know much about real world jobs. You are just one of many, but you care to ask about this on HN, that's something.

And a warm welcome to this imposter syndrome help group, we are always afraid of missing out on some tech. Accept it, everyone is missing out on most of the tech.

When I was studying CS in college, I always wondered why the classes don't teach us about the hot Windows programming thing. All we did were tiny console C programs. I realized that very late, CS classes are meant to let you know about the fundamentals. You probably won't use these skills directly at work, but you will have ideas about how the languages and systems work internally. That pays in the long run.

Just go explore and make mistakes, you will be alright.

Funny, I think the walrus operator makes code cleaner and easier to understand.

Many of my code were like this:

    foo = one_or_none()
    if foo:
        do_stuff(foo)
Now I have the following:

    if foo := one_or_none():
        do_stuff(foo)
This kind of code happens quite frequently, looks nicer with walrus operator to me.
Re:W3M Rocks on Sunday April 10, 2022 @10:21AM (#30977119)
Just curious, what are the advantages using w3m instead of eww?
Re:Ask HN: Firefox connection problems after enabling DoH? on Thursday January 13, 2022 @05:27AM (#29919095)
I am kind of glad there are so many folks on hacker news using Firefox.

I "fixed" it by refreshing Firefox. You can refresh Firefox from [Help] menu item, and choose [Trouble shooting Mode...]

All features and principles aside, it's a different code base. A mono culture is dangerous for the system, remember heartbleed?
Are the families, friends and supporters of Snowden constantly harassed or threatened by the US government?
I know the project is probably for some fun. Since you already have a sample lisp code to test, why not write tests for it.
Re:How a fake network pushes pro-China propaganda on Thursday August 05, 2021 @02:43AM (#28070604)
Are you suggesting click-bait headlines are equivalent to out right disinformation?
Re:Why you should learn SQL on Wednesday August 04, 2021 @02:25AM (#28057851)
I used to love ORM, I used it everywhere. Writing another language in the language I am coding is wrong. ORM simplifies my programs.

No, ORM does not simplify coding! It's a big complex adapter which does not fit many cases.

RDBM itself is complex enough, let's put another complex abstraction above it so we can forget about the tables and columns and joins and foreign keys. Complexity added upon another complexity does not make a polished interface.

If you want to use ORM, you have to learn both SQL and ORM with some depth at least. When problems occur, you have to debug both.

20 years in, I am still learning about RDBM. I still hate to compose SQL in code, but there is no better way.

Databases are used in every situation. Want to store data? Database. Want to communicate between processes? Database. Want to store logs? Database. There are different solutions for different scenarios, but as long as the DB chugs along, why? Sometimes it's sickening.

So 20 years in, the ROI of learning SQL is great. Please don't avoid learning about RDBM by using an ORM. Just learn it.

Actually, I'm not without ORM now a days. Light-weight ORM like Dapper serves well, it does not abstract out the concepts of RDBM, but make things easier.

With the introduction of M1, it's hard to find any use of paper magazines these days.
After giving some more thought on it. I just realized it was python got me into FP. Although the majority my projects are in C#, Linq never had me interested in FP.

You are right, C# and JS use FP sparingly. I think I expect more from Python because I enjoy writing in Python and my functional adventures were rooted in Python.

Personally, lambda expression is painful to look at. Many times I have deliberately avoided it. It's possible to make improvements, but it seems the FP part just stagnated. Looking forward to pattern matching though.

Older »