It is just shifted through geographic arbitrage. US loses, India Gains.
Sometimes I use AI to write quick functions with bounds checking, it does a decent job, but it always needs tweaking.
AI shines for debugging, when I have something that "should" work, I copy/paste the errors or problem description into AI and ask "How to Fix ELI5"
Once, AI even suggested there was a bug in a library, and it was right.
Note: I pay for Google Gemini 2.5 Pro and find it the best for coding compared to Chat-GPT.
Gemini does a good job of breaking everything down.
Here is an example from a mysql session timeout (brokenpipe) a problem that I just fixed this morning, with the help of AI.
-- START Gemini Pro Session --
ELI5: Fixing "MySQL server has gone away (BrokenPipeError)"
The Problem Explained Like You're 5
Imagine you're on the phone with a friend (the MySQL server). You're talking, everything is fine. Then, you put the phone down for a while to do something else. Your friend, thinking you're done talking, hangs up. A little later, you pick up the phone and start talking again, but your friend is no longer there. All you hear is a dial tone. This is the "Broken pipe" or "MySQL server has gone away" error.
In your code, your application (you) was connected to the MySQL database (your friend). It kept the connection open in a "pool" of connections to be reused, which is efficient. However, the connection sat idle for too long, and the MySQL server, to save resources, automatically disconnected it (hung up). When your application tried to use that same connection again, it discovered the connection was dead, leading to the error.
This specific error trace shows that SQLAlchemy, a tool that helps your Python code talk to the database, tried to clean up (rollback a transaction) on a connection that had already been dropped by the server.
The Fix: How to Keep the Conversation Going
The most common and effective way to fix this is to tell SQLAlchemy to check if the connection is still alive before using it, or to regularly refresh the connection. Here are the recommended solutions, from most common to more specific:
1. Recycle Connections (pool_recycle) - The "Hang Up and Redial" Approach
This is the most common and generally recommended fix. You can tell SQLAlchemy to automatically close and replace connections that have been open for a certain amount of time. This time should be less than the MySQL server's wait_timeout (which is often 8 hours by default, but can be much shorter on some hosting providers). A safe value is often 3600 seconds (1 hour) or less.
When you create your SQLAlchemy engine, add the pool_recycle argument:
Python
from sqlalchemy import create_engine
# Add pool_recycle to your engine creation
engine = create_engine(
"mysql+pymysql://user:password@host/dbname",
pool_recycle=3600
)
2. Pre-Ping Connections (pool_pre_ping) - The "Are You Still There?" Check
This option tells SQLAlchemy to send a very small, quick message (a "ping") to the database to see if the connection is still active before your application uses it. If the ping fails, SQLAlchemy will replace the dead connection with a new one. This is very reliable but adds a tiny bit of overhead to each database operation.
Python
from sqlalchemy import create_engine
# Add pool_pre_ping to your engine creation
engine = create_engine(
"mysql+pymysql://user:password@host/dbname",
pool_pre_ping=True
)
For many applications, pool_pre_ping=True is the most robust solution.
3. Adjusting Server-Side Timeouts (If you control the server)
If you have administrative access to your MySQL server, you can increase its wait_timeout value. This tells the server to wait longer before hanging up on idle connections. You would typically change this in your MySQL configuration file (my.cnf or my.ini).
[mysqld]
wait_timeout = 28800
After changing this, you must restart the MySQL server. However, it's often better to make your application more resilient (using pool_recycle or pool_pre_ping) than to rely on server-side settings.
4. For Large Queries: Check max_allowed_packet
Less commonly, this error can occur if you are trying to send a very large piece of data to the database that exceeds the server's max_allowed_packet size. If you are inserting or updating a row with a lot of text or a large binary file, and the error happens consistently with that operation, you may need to increase this value in your MySQL server's configuration file.
[mysqld]
max_allowed_packet=64M
Again, this requires server access and a restart of the MySQL service.
Summary
In most cases, the simplest and most effective way to fix the "MySQL server has gone away" error is to configure SQLAlchemy's connection pool to handle stale connections gracefully. Start by adding pool_pre_ping=True or a reasonable pool_recycle value to your create_engine call. This ensures your application doesn't try to talk on a dead line.
Just say "No" and ignore them. Do not feed the trolls.
They will eventually go away and bother someone else or they could come to NL and go to court and explain their a**hattery.
Yep. As a grizzled greying-hair, I'm not super worried about myself. I have the experience and knowledge to continue to do things AI simply can't, and probably won't before I retire. For that, I'll continue to command pretty good pay at a phase in my life when my kids are moving out and my expenses are going down. Bully for me.
Automation always shoots for low-hanging fruit. When that's factory assembly line workers, it's not such a big deal (it is for the workers, obviously, but I'm talking systemically) because those types of work don't usually have a significant career ladder, and after you automate, you don't need much of that role at all anyway.
When it's chopping off the bottom rungs of longer career ladders, it ultimately creates real supply chain issues for talent at the high end.
Computer science isn't supposed to be vocational training.
This guy isn't trolling. I remember 25 years ago being told exactly this by a professor at a Big 12 university.
The colleges are flat out TELLING YOU TO YOUR FACE that they aren't going to teach you what you think you're going there for, and you're going there anyway and signing away tremendous amounts of money for the privilege.
Meantime, technical/community colleges often DO try to fill that niche, and far more cheaply, but they're looked down upon as a "lesser education" -- and it's true. It IS a lesser education. They're 2-year degrees, and you can often pay for them in cash. You don't get anywhere near as much "general education" (i.e. the stuff that most people AREN'T going to Uni for anyway), and most of them are every bit as far behind the state of the art as most universities are (i.e. the tech education is BS anyway).
So there's a choice between spending an absolute ASS TON of money on a university that doesn't want to teach you vocational stuff, a technical school that's far cheaper but still doesn't really teach you anything modern and gives you a degree no one respects, or just teaching yourself. In tech, honestly, just teaching yourself is the way to go. You'll learn the programming in a few years on your own, and you won't be in debt for the next 20 years. Whatever couple rungs of the ladder you are docked are easily recovered in your first few years of experience anyway, and then almost no one gives a shit about your degree anyway.
While supporters argue that the policy will spur growth, attract investment, and create jobs domestically, critics warn that it will lead to significantly higher prices for shoppers.
The new tariff on imported cars will take effect on April 2, while the import duty on car parts will go into effect on May 3. The components subject to the new policy include engines and engine parts, transmissions and powertrain components, and electrical systems.
Under the plan, imported vehicles will be taxed only on their non-US content.
I am with you brother, it is good for simple things but the indenting for codeblocks and gymnastics for magic methods and mixed programming paradigms.
I use C most of the time and BYTHON is something I want to check out.
def print_message(num_of_times) {
for i in range(num_of_times) {
print("Bython is awesome!");
}
}
if __name__ == "__main__" {
print_message(10);
}./qu
Coding is not the point of the CS50 class.
The point is code literacy and the intellectual pursuit of computer science.
CS50 isn't just about learning to write code; it's about fostering computational thinking and code literacy. While coding is a crucial tool, the core of CS50 lies in understanding the underlying principles of computer science. The course meticulously builds a foundation, starting with fundamental building blocks like variables, data types (booleans, integers, etc.), control flow (if/else statements, loops), and functions. It then progresses to more complex concepts like data structures (arrays, linked lists, trees), algorithms (searching, sorting), and algorithm analysis using Big O notation. This journey from the micro to the macro gives students a holistic view of how software works.
CS50 empowers you to dissect and comprehend code, regardless of the specific language. Instead of just blindly writing lines of code, you learn to think algorithmically, breaking down problems into logical steps that a computer can execute. This understanding is crucial for leveraging tools like AI code generation. Imagine using an AI assistant like Claude: with a CS50 background, you wouldn't just accept the generated code at face value. You'd be able to critically evaluate it, understand its logic, identify potential flaws, and modify it to perfectly fit your needs. You become a collaborator with the AI, not just a passive user.
Harvard's commitment to making CS50 accessible to the world is commendable. The course's comprehensive curriculum, combined with its engaging teaching style and extensive online resources, has democratized computer science education. The availability of variations like CS50 AI further demonstrates the program's dedication to exploring cutting-edge topics and preparing students for the future of technology. CS50 isn't just a course; it's an investment in developing the next generation of problem solvers and innovators.
CS50 is a brilliant class and I applaud Harvard putting it out there for the world. Thank you HARVARD! I wish I could have gone to Harvard.
Gawd. I felt that.
Though for me it's not that people are moving up faster, it's that companies can't keep focus on anything long enough to see even a medium-term play pay out. If it's not short-term tactical bullshit, then it's taking too long and we need to cancel it. You can spend all your time fixing all the previous short-term tactical shit instead. And anyway, I know we took up all your time on horseshit and told you not to work on it, but why isn't that medium term project delivered yet?
Meanwhile, the people who ARE moving up are the people who "solution" with unsolicited clever-sounding bullshit in meetings, and over-simplify everything that
This isn't why I became a programmer. There's no craft left in it anymore.
When someone does something stupid, it seems there is an infinite budget to search, interview, analyze etc...
It makes me wonder what if all the effort to analyze and help this person was on the front end?
I know, crazy talk.
AV is only is good as the last update so why bother. Just use the built in vendor stuff.
And with MVNOs if you ever need more data, your (sic) unlimited data rate doesn't slow to drinking through a straw. I do the same thing, buy my own phones and use an MVNO. It's not that hard and we get two smart phones for $30ish a month. I don't need the $250 Verizon plan.
Simple Solution: Don't Buy a Locked Phone
Great, you ditched the legacy CPU Intel chip, now where is all ARM native windows software and what do I do with my existing legacy non-arm software.
There kinds of needs a bit more to this play than a press release. If I want 22 hours of video playback I'll get an iPad or MacBook Air.
Lisp Users: Due to the holiday next Monday, there will be no garbage collection.