There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

lugal , in Unicode

Ä3

FartsWithAnAccent , in It's time to mentally prepare yourselves for this
@FartsWithAnAccent@fedia.io avatar

"Forget it Jake, it's Moontown."

xlash123 , in It's time to mentally prepare yourselves for this
@xlash123@sh.itjust.works avatar

Shouldn’t it have its own time system? And have its own time zones? You can’t give the moon its own single time zone (unless you’re into the idea of a single universal time zone).

whotookkarl ,
@whotookkarl@lemmy.world avatar

There’s not really a difference between 0 timezones and 1 timezone, let’s split it and go with 1/2 timezones

ricecake ,

That’s actually what they’re doing. The reporting said timezone when the actual order is more about time standards.

They’re creating coordinated lunar time, as a complement to coordinated universal time, so it’s a different time system with details about how it relates to UTC.

whitehouse.gov/…/Celestial-Time-Standardization-P…

Timezones on the moon don’t serve as much function, because the day/night cycle is closer to a month long, and doesn’t map to human rhythms at all. In a hypothetical where we have moon colonies on opposite sides of the moon, there’s no reason for them to not still have synchronized day/night, since it already has no relation to the movement of the sun in the lunar sky.

JoMiran , in It's time to mentally prepare yourselves for this
@JoMiran@lemmy.ml avatar

Anyone else keep nearly everything set to UTC?

teft ,
@teft@lemmy.world avatar

In the military that’s all we used. It’s called Zulu time in the Army and it makes for coordinating events in multiple time zones fairly easy. I would assume the moon would be the same since there will 100% be a moon base with military.

JoMiran ,
@JoMiran@lemmy.ml avatar

I have response teams in a “follow the sun” model as well as having my US team spread coast to coast, plus all our clients set their servers to UTC. It makes the most sense to keep something set to UTC at a moment’s glance.

ThePyroPython , in It's time to mentally prepare yourselves for this

The Royal Observatory Greenwich:

“Well, as the first to co-ordinate time we-”

The International Telecommunication Union and International Earth Rotation and Reference Systems Service in Unison:

“Excuse me, I think you’ll find we manage the time.”

NIST: “I don’t see your footprints up there! We’re going off my Omega Speedmaster!”

snack_pack_rodriguez , in It's time to mentally prepare yourselves for this

I say we compromise we will take the moon but they must give up daylight savings. it’s only fair.

kambusha ,

Adds moonlight savings

Infynis , in It's time to mentally prepare yourselves for this
@Infynis@midwest.social avatar

Can’t believe the US is putting trains on the moon before making them viable on Earth

Dr_Vegapunk , in It's time to mentally prepare yourselves for this

Will it follow the lunar calendar?

LinearArray , in You wouldn’t get it
@LinearArray@programming.dev avatar

now i get it, do i?

swordsmanluke , in We'll refactor this next year anyways

Have you ever been in an old house? Not old, like, on the Historic Register, well-preserved, rich bastard “old house”. Just a house that has been around awhile. A place that has seen a lot of living.

You’ll find light switches that don’t connect to anything; artwork hiding holes in the walls; sometimes walls have been added or removed and the floors no longer match.

Any construction that gets used, must change as needs change. Be it a house or a city or a program, these evolutions of need inevitably introduce complexity and flaws that are large enough to annoy, but small enough to ignore. Over time those issues accumulate until they reach a crisis point. Houses get remodeled or torn down, cities build or remove highways, and programs get refactored or replaced.

You can and should design for change, within reason, because all successful programs will need to change in ways you cannot predict. But the fact that a system eventually becomes complex and flawed is not due to engineering failures - it is inherent in the nature of changing systems.

bort , (edited )

the fact that a system eventually becomes complex and flawed is not due to engineering failures - it is inherent in the nature of changing systems

it is not. It’s just that there will be some point, where you need significant effort to keep the systems structure up to the new demands {1}. I find the debt-metaphor is quite apt [2]: In your scenario the debt accumulates until it’s easier to start fresh. But you can also manage your debt and keep going indefinitily. But in contrast to financial debt, paying of technical debt is much less obvious. First of all it is pretty much impossible to put any kind of exact number on it. On the other hand, it’s very hard to tell what you actually should do to pay it off. (tangent: This is why experienced engineers are worth so much: (among other things) they have seen how debt evolves over time, and may see the early signs).

[1] …substack.com/…/the-openclosedopen-principle

[2] blog.pragmaticengineer.com/tech-debt/

EatATaco ,

My 100 year old house has marks on the floor that look like it was worn from a door swinging. Very distinctive arc pattern. Like it was there for many years and was under frequent use.

The problem is that there’s no door there, just a wall, which is also the edge of a dormer…so if there were a door there it would just open out onto a sloping roof.

Every time I register it I contemplate why it’s there and wtf happened.

brandon ,

There was most likely a closet or other crawl space storage area there. My house has closets like that but luckily full height entries to them so we can actually step in. I’ve seen other houses with 1/2 or 1/3 height doors leading to under-roof crawl spaces for storage.

rollerbang ,

You can and should design for change, within reason, because all successful programs will need to change in ways you cannot predict

You’ve yourself here. You can not predict how it wull change. Which means that whichever design for change you’ve made, may just as well completely miss the future utilization

Which doesn’t mean that we shouldn’t design for change at all… Just saying.

sebsch ,

As long as loose coupling, and separation of concerns are well tinkered into your application you minimise risks of breaking everything on a restructuring.

If you have for example shared state leaking everywhere into the program, your most probably doomed on the slitest changes.

I am not saying you’re wrong, but there are ways to mitigate the risks even without knowing what will happen in the future.

agressivelyPassive ,

You can design it to be changeable at all, though.

In the simplest case that’s just proper abstractions. You can’t change details in the rest controller, if the persistence layer absolutely needs to call methods from the rest controller for no reason.

Finding the right balance between YOLO and YAGNI is almost impossible to get right. But you can at least try not to land on the extremes.

swordsmanluke ,

Just saying.

… Saying what, exactly?

I said that we should

  • design for change
  • "within reason"
  • because we can’t know what exact changes are needed.

And you argued… The same thing? Just in the reverse order?

Serinus ,

Seems like he’s worried you’ll Java everything up, which can be valid.

I think a good, easy example is whether your application should allow a selection of databases or be tied to one database.

You can make arguments for either, often (but not always) regardless of your use case.

magic_lobster_party ,

You can build your systems with as few assumptions as possible. The fewer assumptions you make, the less probable it is that any of your future assumptions will conflict with your previous assumptions. Your code will be built for change.

If your API call to some external system assumes the existence of a particular button in the UI, then your system isn’t built for change. Maybe you want to change this button? Then you need to go through all places in the code that relies on this particular button to see if it doesn’t conflict with any of their assumptions.

dan ,
@dan@upvote.au avatar

You’ll find light switches that don’t connect to anything

My house was built in the 1960s and had a switch like this. I was always curious what the switch was actually doing. One day, I was replacing all the light switches with smart switches, and discovered that the switch didn’t even had a load connected to it! It was literally doing nothing.

I was perplexed by this until I saw some old photos of the house, from the early 2010s when the previous owners bought it. It turned out that there were originally ceiling lights in the room (George Nelson bubble lamps, fitting the mid-century modern design of the house) that were removed at some point, and the switch was left behind. I had an electrician install recessed lights in most rooms, and they found old wires for the old lights. It wasn’t actually proper power cabling though… They had used speaker cables to power the lights!

swordsmanluke ,

I used to work summers as an apprentice electrician. The amount of crazy wiring I saw in old houses was (heh) shocking. Sometimes it was just that it was old. Real old houses sometimes just had bare wire wrapped in silk. … And a few decades later that silk was frayed and crumbling in the walls and needed replacing.

My current house was wired at a time when copper was more precious, so it was wired up and down through the house, with circuits arranged by proximity, not necessarily logic. When a certain circuit in my house blows the breaker, my TV, PC and one wall of the master bedroom all lose power. The TV and PC are not in the same room either.

mojofrododojo ,

in the 80s I helped gut a house that had aluminum wire with paper thin cloth wrapping. anywhere you touched it it would just disintegrate. blew my mind that the place hadn’t burned to the ground, especially all the dead rodents that had nested in the piles of fragmented cloth wrap.

Midnitte ,

My hallway has a light like this that was removed from what I can only guess was water damage and the accompanying upstairs bathroom renovation.

It’s astounding to me that they would go through the trouble of renovating the bathroom, but not have reinstalled the light so that the hallway isn’t a dark safety hazard… 😒

JayDee , in You wouldn’t get it

Is it possible to get the joke at runtime using the spectre exploit?

coloredgrayscale ,

Not required. Looks like Java, just use reflection.

hydroptic , in You wouldn’t get it

Where are your gods now?


<span style="font-weight:bold;color:#a71d5d;">public static </span><span style="color:#0086b3;">Joke </span><span style="color:#323232;">getTheJoke(</span><span style="color:#0086b3;">Meme</span><span style="color:#323232;"> yourMeme) {
</span><span style="color:#323232;">  </span><span style="color:#0086b3;">Field</span><span style="color:#323232;"> jokeField </span><span style="font-weight:bold;color:#a71d5d;">= </span><span style="color:#0086b3;">Meme</span><span style="color:#323232;">.class.getDeclaredField(</span><span style="color:#183691;">"joke"</span><span style="color:#323232;">);
</span><span style="color:#323232;">  jokeField.setAccessible(</span><span style="color:#0086b3;">true</span><span style="color:#323232;">);
</span><span style="color:#323232;">  </span><span style="font-weight:bold;color:#a71d5d;">return </span><span style="color:#323232;">(</span><span style="color:#0086b3;">Joke</span><span style="color:#323232;">) jokeField.get(yourMeme);
</span><span style="color:#323232;">}
</span>
RonSijm ,
@RonSijm@programming.dev avatar

Is it Java? It looked like Microsoft Java C# to me…


<span style="color:#323232;">    public static void Main(string[] args)
</span><span style="color:#323232;">    {
</span><span style="color:#323232;">        var meme = new Meme();
</span><span style="color:#323232;">        var joke = GetTheJoke(meme);
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">    
</span><span style="color:#323232;">    public static Joke GetTheJoke(Meme theMeme)
</span><span style="color:#323232;">    {
</span><span style="color:#323232;">        var memeType = typeof(Meme);
</span><span style="color:#323232;">        var jokeField = memeType.GetField("Joke", BindingFlags.NonPublic | BindingFlags.Instance);
</span><span style="color:#323232;">        return (Joke)jokeField.GetValue(theMeme);
</span><span style="color:#323232;">    }
</span>
hydroptic ,

Frankly it’s been a while since I wrote either one. I just assumed Java because of the naming convention, and I didn’t see anything I took as obviously un-Java in the class definition

PoolloverNathan ,

There isn’t an unnecessary level of capitalization; seems to be regular Java with Allman braces.

Hazzia ,

Is it Java?

Wait a minute, that’s an actual thing in java!? What the fuck Java I already didn’t like you and now you start pulling this shit? What even is the point of creating standards if you design backdoors to them

RonSijm ,
@RonSijm@programming.dev avatar

Yea, what @hydroptic posted is actually Java

What even is the point of creating standards if you design backdoors to them

If you’re building in a backdoor anyways, why would the backdoor require 5 lines of weird reflection to get the type, type info, fieldinfo with the correct binding flags, and then invoking the method?

I think it’s kinda neat compared to C#, just being able to say “Ignore private/protected/internal keywords”

hydroptic , (edited )

If you want to be able to eg. (de)serialize non-public fields of a type for any reason, you’ll need some way to get around the access restriction. Mocking is another use case – although it’s a philosophical discussion whether you should be mocking non-public fields.

And this isn’t just a Java thing, the comment you’re responding to has an example in C#, and you can do something similar in a lot of languages that support runtime reflection. Barring runtime reflection support you can do pointer math if the language supports it. Access restrictions on fields are there to stop casual misuse of private fields, but sometimes you actually may want to be able to step over those restrictions if you really know what you’re doing.

rimjob_rainer ,

Reflection is sometimes a necessary evil. At least it makes it harder to abuse the class and if you do, then you are responsible if something goes wrong.

noproblemmy ,

If you have to cast your joke it isn’t funny?

Karyoplasma ,

Could just change it to public static Object GetTheJoke, no?

rimjob_rainer ,

Because C# is a Java clone

sik0fewl , in You wouldn’t get it

Upon reflection, I do get the joke now.

rimjob_rainer ,

This one gets it

reverendsteveii , in You wouldn’t get it

throw new SameJokeException();

Tetsuo , in Sometimes the decisions are hard...

Same devs as the Nvidia driver installer?

I always select the custom install option and always get recommended the same version that is already installed.

(Physics engine or something).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines