HNHacker News
TopNewBestAskShowJobs

tlocke

420 karma · joined May 17, 2011

https://www.tlocke.org.uk/
submissionscomments
tlocke··on “Critical” projects and volunteer maintainers
I got an email a few days ago saying that a couple of my Python projects were 'critical', and I'm not sure what to make of it all. On the one hand I like working on the software and listening to users and improving it and it's good that a lot of people find it useful. On the other hand I find myself feeling a bit exposed, and feeling a bit of pressure, and that makes it feel like 'work but without getting paid'.

The thing I liked about doing open source in my spare time is that there was absolutely no pressure and I could take as long as I wanted to ponder the technical details and there was a kind of purity to it. Now it feels like there's a sense of expectation that I need to fulfil.

tlocke··on Low economic growth is a slow-burning crisis for Britain
Curiously, in this case the people of the UK actually wanted to be lied to in order to 'get Brexit done'. The previous prime minister (Theresa May) was honest about Brexit, saying that it would involve putting a customs border down the Irish Sea, cutting off Northern Ireland. She was removed for voicing this inconvenient truth and replaced by Johnson, who said that he would 'get Brexit done' without any border. Hence his famous, 'we'll have our cake and eat it' comment.

So the upshot is that the UK purposely voted for a shifty character, and that's what they got!

tlocke··on Ask HN: How do you explain the sloppiness of modern software?
My rule of thumb is that the quality of software is inversely proportional to the distance between the user and the programmer. If the programmer is in direct contact with the user you generally get good software. If there are layers and layers of people in between user and programmer, the software gets progressively worse.
tlocke··on Economists are revising their views on robots and jobs
> As to returns to IP holders, those are often the pension fund, who then pay the pensions to pensioners who then spend it on stuff.

Pensions aren't distributed evenly across the population, it tends to be that the richer you are, the bigger the pension. That means that IP has the effect of making the rich richer, increasing inequality.

tlocke··on Is It Even Worth Working on FOSS Anymore?
To me, it's not a problem that my code is used for commercial gain. I use the MIT licence (a permissive licence). The key thing for me is that it doesn't give companies a competitive advantage, rather it puts companies that don't use it at a competitive disadvantage. It's thanks to Open Source that I'm writing this on a system that uses 100% Open Source software (okay, maybe the BIOS isn't). A good thing about Open Source is that if a company uses it, they're more likely to report / fix bugs, which helps everyone.
tlocke··on Is It Even Worth Working on FOSS Anymore?
I work on a few Open Source libraries and they're used by companies that make a lot of money, and people often regard me as a mug for doing the hard work for free so that other people can make lots of money. The argument I give in response is that from an economic perspective, you can only make money from a unique advantage, and since Open Source can be used by anyone, it's not giving anyone a unique advantage. I'd put it this way, that any company that's not using Open Source is putting themselves at a disadvantage.
tlocke··on Is It Even Worth Working on FOSS Anymore?
Is this still true? The latest version of Ubuntu will run fine on most laptops that Windows will run on, and LibreOffice provides an equivalent to MS-Office. I'm not sure about Photoshop because I don't use an image editor, but in the Open Source world there's Gimp, Krita and Pinta for example.
tlocke··on Leaving Quora after 10 years of answering questions
For me, it's all in the licence that the content is under. I contribute to Stack Overflow and Wikipedia because the content is under an Open Source licence. For Quora and Reddit the licence is proprietary and so I don't contribute.
tlocke··on FAQs: Why we don’t have them (2013)
I agree that information shouldn't be duplicated, but in one of my projects I've taken the opposite approach and made the FAQ the only place that certain information is presented. It's for the library https://github.com/tlocke/pg8000 and I've called them 'Examples' rather than a FAQ, but each time I get a question that isn't covered by the examples I add in a new example. I'd be interested to hear what people think of this approach.
tlocke··on Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
One problem with Ion is that it doesn't have a map type, but instead a struct type that allows duplicate keys. I created Zish https://github.com/tlocke/zish as a serialization format that addresses the shortcomings of JSON and Ion. Any comments / criticisms welcome.
tlocke··on A patent troll backs off
True, I should have put better. Maybe, 'Why would a company invest in research if a patent troll could come along and extort money from them from day one?'
tlocke··on A patent troll backs off
My response to that is, why would a company invest in research if a patent troll could come along and put them out of business on day one?
tlocke··on France bets on more nuclear power in face of Europe energy crisis
It's difficult to work out the cost of nuclear in France because the electricity industry is so intertwined with the state. For example, how much does their insurance cost? I bet they're effectively insured by state which doesn't show up in the figures. Also, the only country in the world that actually has a long-term solution for nuclear waste is Finland. To their credit, the Finns have built a storage facility that can remain intact for the necessary 10,000 years. The French have no long term nuclear waste storage, they're just kicking the can down the road, as is every other country except Finland.
tlocke··on France bets on more nuclear power in face of Europe energy crisis
I think we're talking at cross-purposes. I'm saying that it's only when the supply from renewables exceeds total demand, you need storage. Otherwise if the supply from renewables doesn't meet demand then there's nothing left over to store, and you'd need to start burning gas.

Note that the end-game is that renewables become so pervasive that there are significant periods when renewable generation does exceed total demand, and then you generate hydrogen with it. That hydrogen then displaces the natural gas that's currently used, the storage / pipework infrastructure for natural gas being equally suitable for hydrogen.

tlocke··on France bets on more nuclear power in face of Europe energy crisis
To take the USA for example, it'll play out like this. As more and more renewables are built there will be periods where the amount of renewable electricity will exceed demand. During these periods, electricity will be very cheap and will be used to create hydrogen. The existing natural gas storage and pipework will be used for hydrogen instead, and hydrogen turbines / fuel cells will be built. So the natural gas infrastructure will be taken over by hydrogen, generated from renewable electricity. This gradual takeover will extend to heating. Natural gas boilers in homes / buildings will be converted to hydrogen, and so in the end the USA will end up with zero carbon emissions for electricity and heating.
tlocke··on France bets on more nuclear power in face of Europe energy crisis
To address the baseload question. Baseload for a period is the level below which demand doesn't drop. Baseload isn't a relevant figure if you're running a power network. The job of a grid operator is to make sure supply matches demand from second to second. What happens is that the grid operator uses the cheapest marginal electricity first, which is always renewables, then if there's still a gap it's filled with power from a gas power station. That gap is continuously varying, and gas power is needed because it can continuously vary in response. The point is that baseload isn't a relevant concept in balancing the grid, it's all about matching supply with demand.
tlocke··on France bets on more nuclear power in face of Europe energy crisis
So to address the point of renewables and storage. Storage of the electricity produced by renewables is only needed when it exceeds demand. The UK is part of a European grid, and so a wind farm in Scotland only needs to store electricity if the whole of Europe is already running on 100% renewable. We've not reached that level so far, and won't for quite a while.
tlocke··on France bets on more nuclear power in face of Europe energy crisis
Nuclear may or may not beat coal, but the competition is with renewables. Nuclear is far, far more expensive than renewables.
tlocke··on France bets on more nuclear power in face of Europe energy crisis
The fact is that nuclear is extremely expensive, and only gets built where there's huge government subsidy. The subsidy that renewables get pales in comparison to nuclear subsidy. Take the UK for example. Here we have a relatively free market in electricity generation. It's been possible for decades for a private company to build a nuclear power station, but nobody has. The only ones planned or built have enormous subsidies where the government has run roughshod over the free market. Nuclear just doesn't make economic sense.
tlocke··on California is shutting down its last nuclear plant
The problem is that the operating costs are very high for nuclear (insurance alone is huge). Financially you're better off shutting down nuclear and putting the money into renewables.
tlocke··on Andrew Yang Founds the Forward Party
The UK is different from the USA because it doesn't have a written constitution. Then UK has a parliamentary system but the USA has a presidential system. I'd say that from a constitutional perspective the US system is most similar to the French system.
tlocke··on Show HN: Facata – Connect to SQL Databases from Python
Actually, I retract my comment that Facata has better performance than SQLAlchemy with raw SQL.

Really, the only reason I can think of for using Facata over SQLAlchemy is if you don't want the extra functionality that SQLAlchemy gives you.

tlocke··on Show HN: Facata – Connect to SQL Databases from Python
That prepared statement caching is a feature of a particular DBAPI driver rather than SQLAlchemy itself. I take your point though, and I'd say that Facata is designed to be an alternative to DBAPI 2 rather than an alternative to SQLAlchemy.

On the performance, I'm basing this on the fact that SQLAlchemy does a lot more than Facata. You're right though, actual measurements would be interesting.

tlocke··on Show HN: Facata – Connect to SQL Databases from Python
Thanks! Facata is really a low-level API, so the only SQL that's sent is what's explicitly sent. That means it wouldn't have a 'with' for transactions because that would require SQL to be sent 'behind the scenes'.

Thanks for pointing me in the direction of psycopg2.sql, it looks interesting and I'll give it some thought.

tlocke··on Show HN: Facata – Connect to SQL Databases from Python
You could do that, but Facata works at a lower level, so for example you can use prepared statements, which SQLAlchemy doesn't support. Also, Facata has better performance and fewer dependencies if you only want to use raw SQL.
tlocke··on Show HN: Facata – Connect to SQL Databases from Python
That's a good idea. I'll look into it, thanks!
tlocke··on Show HN: Facata – Connect to SQL Databases from Python
Creator of Facata here. DBAPI 2 is the standard for accessing SQL databases from Python, but since it's about 20 years old now, I thought I'd have a go at updating it in the form of a Python library that's a wrapper for DBAPI 2 driver. The main differences with DBAPI 2 are:

* DBAPI 2 has five ways of writing parameters in SQL, but Facata has just one.

* In DAPI 2 parameter values can be provided as a sequence or mapping, but in Facata parameter values are provided as keyword arguments.

* DBAPI 2 has four levels of threadsafety, but Facata just has one.

* DBAPI 2 has a 'cursor' object, but in Facata there is no cursor object and statements are executed using the connection.

* DBAPI 2 overrides the autocommit mode of the underlying database by silently sending START TRANSACTION statements if a transaction isn’t already in progress. Facata never silently sends SQL statements.

All feedback gratefully received :-)

tlocke··on Chip shortage: Toyota to cut global production by 40%
Cars tend to diminish quality of life. Local, walkable and cyclable neighbourhoods on the other hand enable people to flourish. When people have to travel by vehicle, trains and trams are superior to cars.
tlocke··on My take on the study from MIT that predicts “societal collapse”
You're right that energy ultimately dissipates as heat, but the important thing is what the energy achieves in between hitting the earth as sunlight and then heading off into space as infrared. If you put a solar panel in place to turn the light into electricity and then use that electricity to write a Python plugin for Flake8 https://github.com/tlocke/flake8-alphabetize then maybe you've contributed something to the economy :-)
tlocke··on Audacity is a poster child for what can be achieved with open-source software
One big problem with MS-Office is that it defaults to proprietary formats (xlsx, docx and the like) but LibreOffice defaults to Open Document Format. So with LibreOffice you can avoid getting locked in to a particular office suite.
← PreviousPage 3 of 5Next →