Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment Re:unconcerned (Score 5, Insightful) 82

OMG THIS!!! A million times this!!! You have hit on every pet peeve of mine that has become a norm with the advent of the "everyone can code" movement. What used to be an elegant art form of writing bullet proof software to withstand the test of time has devolved into a "we'll clean it up later" enshitification of the craft. I used to see mind-blowing artisans at work, then came the StackOverflow cut-and-pasters, then the "duct tape 20 packages together" to print a string to stdout, and now the vibe coders with 3000-line PRs of AI slop.

Every sign points to a new COBOL-esque super cycle where graybeards get pulled in to scape away countless layers of machine-generated "code" in order to get a broken system back on track.

Comment Utility patents should be banned ... (Score 1) 57

Both US10912502B2 and US10945648B2 are piss-poor patents. There's nothing novel there; it's just rearranging components from other manufacturers into a use case based on refining an existing use case and patenting that remixed use case. I'm not delusional enough to imagine we'll wake up and ban utility patents, but I am crazy enough to think that if we're going to let these things stand, then we need to have a federally mandated cap on what holders can charge for an idea. If there's one thing I've learned in this life, it’s that ideas are worthless; execution is everything. So we should monetize ideas based on what value they have. For utility patents, it should be a minute amount. Like a cap of $0.0001 per unit or a 1-time fixed license of $1000. That would end this waste of resources and court time. When it costs more to hire a lawyer to sue than you can recover, the idiocracy will end.

Comment Re:I can think of two reasons (Score 1) 224

Europe is suffering under the weight of poor policy choices:

1) Over-regulation

On paper, strict regulation protects consumers, the environment, and markets. But in a global economy, excessive red tape can stifle innovation and push industries abroad. Multiple studies from the European Commission note that fragmented regulations and bureaucratic compliance burdens weaken competitiveness compared to the U.S. and Asia.

2) Terrorism

Contrary to common perception, terrorism remains an ongoing challenge in Europe. According to Europol’s EU-TE-SAT 2025 report, between 2020 and 2024, the EU recorded over 200 terrorist incidents and over 2,000 terrorism-related arrests. In major urban centers, heavily armed counter-terror units are now a routine presence in train stations, airports, and large public gatherings.

3) Emigration

Over-regulation and terrorism don’t foster innovation or "joie de vivre“; it makes people want to look for a better life elsewhere. Europe’s innovation pipeline is under pressure and faces sustained emigration of highly skilled workers. North America continues to draw top European talent, particularly in AI, biotech, and finance. There may be a Trump blip in early 2025, but the regulation and security concerns still exist, so it will be a short-lived blip.

Comment Re: What will be interesting... (Score 1) 61

The models you can run on your laptop are quantized to hell, have a fraction of the parameter count, and the context windows are tiny. Youâ(TM)re comparing a skateboard to a spaceship. Sure, they both get you from A to B but the speed, quality, accuracy, and capabilities are borderline incomparable.

Comment Re:The answer is simple (Score 1) 78

> Developed shortly after new for no apparent reason

Some useful information: Apple has a 1-year warranty on laptops. If it's less than a year old, you can bring it to the store, and they'll fix it or give you a new one on the spot. You can also bring it to the store for repairs up to 7 years after they discontinue the model. If you bought Apple Care, you can bring it in within 3 years, and they'll fix it or give you a new one. If you renewed Apple Care, you can bring it in and they'll fix it or give you a new one.

So which one of these is true:

a) You didn't know
b) The issue is so minor you don't care
c) You don't feel like getting fixed
d) This was not a new laptop
e) This never happened

Comment Re:He didn't promise to (Score 1) 123

> You traded a stable economy and good solid infrastructure spending and jobs and low interest rates ...

So true. I mean, look at the jump in mortgage rates after Trump took office in 2021::

https://fred.stlouisfed.org/se...

We had a chance to vote that bag of meat out in 2024, and instead, morons gave him a 3rd term? We had a cratering M&A market under Trump's Lina Khan FTA, as reflected in this chart::

https://www.marquetteassociate...

Wasn't that enough? Why choose to continue snuffing out our startups? So dumb. The other issue with Trump is the corruption. For example, in 2021, Trump spent $42B on broadband to connect 0 rural homes to the internet::

https://www.washingtonpolicy.o...

Not a single home? What the heck did his MAGA mini-hitlers spend that money on? Pro-straight white male comic books and operas?

I struggle to reconcile how an senile man, whose physician purposely skipped a mental evaluation because it "wasn't necessary", got elected to a 3rd term::

https://thehill.com/opinion/wh...

We are truly living in an idiocracy, I worry about this country. We should be emulating Cuba's communist paradise where the economy is strong, food is plentiful, and infrastructure top notch:

https://travel.gc.ca/destinati...

I mean, 10% of the Cuban population came here to help us stave off the imminent collapse of civilized society by showing us the wonders of communism.

The nail in the coffin should have been *convicted* pedophile Jeffrey Epstein donations to Republican candidates:

https://abcnews.go.com/Politic...

Even that was not enough to save us from Teflon Don. How anyone could vote Republican after that revelation is beyond comprehension.

Comment AI for debugging (Score 1) 248

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.

Comment Re:But, but, but..... (Score 1) 153

I was waiting for this one to come up, but yes, some things are absolutely worth eradicating. Nobody is petitioning to bring back polio or smallpox. Mosquito larvae compete for resources with other insect larvae, so fewer mosquitoes will mean more of whatever they're competing with for resources, which could replace them in the food chain.

Slashdot Top Deals

Nature, to be commanded, must be obeyed. -- Francis Bacon

Working...