BehindTheBarrier

joined 1 year ago
[–] [email protected] 2 points 11 months ago (1 children)

Well. Assuming the cost of splitting water is lower than the energy produced from the same amount of hydrogen.

[–] [email protected] 3 points 11 months ago

After using it, coming to python and not having a super easy way to work with dates is a pain.

But DateTime in dotNet have horrible timezone support. It's essentially either local timezone, not timezone or utc. And the utc part is somewhat rough. There's some datetimeoffset and the like, but they too just don't let working with timezones be easy.

[–] [email protected] 2 points 11 months ago

We avoid that, because just at a glance you might not see the function flow change when returns are at the end of lines. It's a minor thing of course.

[–] [email protected] 4 points 11 months ago

Been a while since I used the new thing, immediately hated it. All on mobile.

First of a, the bottom scroll thing on my phone to select a server or whatever it was just ain't it. I didn't use it much, but it seemed extremely annoying to move between dm and servers, especially if they weren't the top ones. You can get lists and such by swiping.

Second was that server channels turned into a huge mess. Showing the last message makes absolutely no sense on any server I use. Especially on bigger game server like destiny group finding one's already long lists turned into miles long lists. Absolutely unusable. I need things compact and clean personally, having the channels big and wide wastes so much space, and again long lists.

Being in a server hides any notifications and dms too.

Everything that was close at hand before is now far away. And that sucks for me.

[–] [email protected] 8 points 11 months ago

It's fairly common, you'll see plenty of Tesla in Norway at least.

I could have ended up with Tesla if I could earn a car before Elon ruined his public persona. Now I'm definitely not getting one. But I do think anyone will get much negative feedback. I'd probably advice them to avoid one, but they are still better then it comes to software, most cars are shit at that.

I do hope a potential strike helps change their image more though.

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago)

I'm not sure how you do it at the moment or already know this since you mention repository pattern. But here's how I know.

A pattern I encountered at my workplace is a split between the repository and the data access (Dao) layer.

The repository implements an interface which other parts of your program uses to get data. The repository askes the data access layer to make database calls.

For testing other parts of the programs, we mock the repository interface, and implement simple returns of data instead of relying on the database at all. Then we have full control of what goes in and out of your legacy code, assuming you are able to use this.

For testing the dao, I don't actually have much experience since that's not a good option for us at the moment, but as others mentioned you can use in memory databases or manually mock the connection object provided to the dao to test that your save methods store the correct data. The latter being somewhat clunky in my experience but the best option when you are trying to save something with 20 values and making sure they end up in the right order or have the right values when converting enum values to strings for example.

I don't know much about cache, but if you want to keep it then it's possible to do it in the repository class.

[–] [email protected] 2 points 11 months ago (2 children)

It's simple. We can go that way and effectively spend double the energy to drive a distance. I don't think it's exactly double but from 40% efficiency to 80% is the engine efficiency. So the number is just a simplification.

Reducing energy use by 50% would mean less energy having to come from other sources. Which aren't necessarily green today.

Both solutions are improvements, but again, why go for the less efficient one when electricity is better?

[–] [email protected] 3 points 11 months ago* (last edited 11 months ago) (4 children)

Here's my view:

Efuel is less efficient, simply because engines that use it are. We waste at least 50% of the energy put into it. Google also says most common cars waste between 60-80% of the energy. This means while Efuel is net zero in terms of production, assuming the energy put into creating it is all clean and 100% efficient. If we view the production and use of efuel as a cycle, you're wasting half the energy every time. Every time the tank is fueled.

Electric engines generally waste roughly 20%. There's some additional loss across the charging of a battery, but it's still far better than a gas engines efficency.

The problem is the energy and waste from battery production, which makes them worse than gas car manufacturing. But they pass gas cars as long as they are used long enough. And here's the important part, we can improve and change batteries and their production process. We are seeing massive research into this and especially into batteries not involving rare materials. We can also improve recycling of batteries. These are all things we can do to avoid oil and gas. Because gas engines are less efficient, and even with Efuel as net zero, the process of production and loss in use is just worse than electricity based use.

And electricity can be clean energy. If we just find better batteries, we can move to a much cleaner process. But a long as we remain on inefficient gas engines, we will always have co2 pollution, along with other pollution. Eg. If Norway with 98% clean electricity swapped to all electric, and battery with the car got on the same level of gas engine in terms of production waste/pollution, we'd be saving so much energy and waste because of the much higher efficiency of electric engines, and reduction in gas use. Efuel can never do that, it will need green energy for production, and waste more energy in use. Thus I see no reason to push this over electric vehicles.

There's other downsides, such as heavier cars cause more road tear and air pollution. So ideally we'll also move away from cars as much as possible. But trains, busses trams and so on can also be all electric and thus more environmentally friendly.

[–] [email protected] 3 points 1 year ago

I don't have this issue, except once when I got my first desktop connected with wired internet. Turns out, yeah the wired internet (or the adapter/driver) can actually wake the computer... Turned it off and been mostly problem free from wakeups.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

So far, no favorites. Be warned, more a rant than anything. It's a burded of my workplace but we use oracles PL/SQL and are constrained by that and honestly nothing is good for it. It's part of the reason why it's a huge technical debt, along side how shitty debugging. Because we can't, there's a way but our firewall have been a big opponent.

But Toad is the best one, and also the worst one. Slow, old, outdated application with a price that is sky high, but the company pays for that. Had it been only SQL, I'd probably be content with jetbrains alternatives. But it does not have good code highlighting for plsql, including a lot of errors on various things. Toad does autocomplete, slow and ugly, and not all things work, but it does it. But Toad is king for doing things to the database. Easy overview of invalid objects, tables, indexes, scripts. You just need to wait for the window to slowly render, and hope the database connection didn't time out since you last used it, or otherwise the application will hang for a while, tell you it didn't work because the connection was lost and then ask if you want to reconnect, sometimes. Other times I crashes, or crashes on the thing you've done a hundred times. Or reports some memory error. God try closing a connection tab when you lost connection to the database or the database turns off. Faster to kill toad with task manager than wait for it to tell you it can't connect to disconnect from the database.

But we need it, because we need to run sql plus scripts, because compiling a package and getting errors and getting taken to the relevant lines is fast. Datagrip couldn't do that, it gave me a terminal with the entire package as inout before printing the errors. Which would significantly increase dev time, and the burden on our sanity, when we can't click the errors.

Toad manages multiple connections nicely, even if you need to wait 2 second when changing between the tabs for each connection because the interface is slow. Datagrip spent ages indexing schemas, didn't keep up with changes and somehow asked for which connection to use in every file you opened. It was messy, toad had database context much more organized. While I'm full stack, I do dabble in more than one database pretty often. From managing the QA databases, to setting up multiple bases for testing or using a few for my own development.

Toad is suffering, and on some days nothing feels like it will work. But it's still the best tool we can find. And not to forget auto format and easy explain plans. Toad had a formatter I haven't looked much at, but it's customization is more details and actually supports plsql, where Datagrip left some of our queries in awful states. The explain plan is a minor one, but it's nice to have it at the press of a button.

But toad is hell. It's slow, it freezes for a second trying to give you autocomplete options, even where you didn't want some like using a builtin sql function... Honestly an area Datagrip was better, except it also highlited all row type properties as missing making errors hard to spot when a file has countless useless errors that you can't remove without taking everything away. Datagrip also made going to function definitions awful, because you often got taken to the database source or got the option between the database and the mapped local files which was very clunky and made a mess of open tabs. Toad only opened the db source, unless you had the file for a package already open and it would take you the the function there. But it's so much more convenient after the files are opened. And development usually doesn't touch more than 4-6 at a time, so once you got them ready things were relatively smooth in Toad.

But don't get Toad, the solution is to not have Pl/sql

[–] [email protected] 4 points 1 year ago

It gets less effective, down to running at 100% and not moving heat. Heat pumps work by expanding a gas, which cools it. Since it's cold, the "heat" outside was the gas. Then the gas is taken inside and compressed, the gas heats up from the compression (since all the energy is squeezed into a smaller space, effectively speaking). Now that heat can be transferred to the colder air inside. So long as the expanded gas turns colder than the outside, it can absorb heat.

From a Google, common ones can go as low as - 25C, which means they are able to cool a gas to lower temps than that when expanded. There is still heat to get, even in -25C.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

I saw these magic windows on my computer, and I too wanted the godlike power to control how they worked and what the buttons did. I looked into Python, then started University and they also taught us Python for science use. With exception of a C++ class, I self learned and used it, then managed to convince a company to hire me to develop, despite being a chemical engineer.

My first program was a GUI wrapper for YouTube-dl, and I still use it frequently.

view more: ‹ prev next ›