Skip Navigation

!

The last post that was federated to LW is from three days ago, and I can't see the community at all via https://programming.dev/c/programmer_humor

2
Jump
Self-documenting Code
  • One upvote is not enough.

    I once wrote a commit message the length of a full blog post comparing 10 different alternatives for micro optimization, with benchmarks and more. The diff itself was ten lines. Shaved around 4% off the hot path (based on a sampling profiler that ran over the weekend).

    21
  • Jump
    Self-documenting Code
  • Ew no.

    Abusing language features like this (boolean expression short circuit) just makes it harder for other people to come and maintain your code.

    The function does have opportunity for improvement by checking one thing at a time. This flattens the ifs and changes them into proper sentry clauses. It also opens the door to encapsulating their logic and refactoring this function into a proper validator that can return all the reasons a user is invalid.

    Good code is not "elegant" code. It's code that is simple and unsurprising and can be easily understood by a hungover fresh graduate new hire.

    67
  • Jump
    Do you refrain from participating to a community if it's hosted on Lemmy.ml ?
  • Yes. I'll read the content, but I try to avoid interacting.

    Mind you, db0 himself is a tankie, although he doesn't seem to insist on imposing that on the users or communities on his instance.

    EDIT: I stand corrected. Apologies to db0 for lumping him in with that crowd.

    -5
  • Jump
    Israel military is checking possibility it killed Hamas leader Sinwar
  • I hope you're wrong about both Israeli territorial ambitions and the unwillingness of Hamas to release hostages.

    How are the Egyptian media covering the news?

    2
  • Jump
    Israel military is checking possibility it killed Hamas leader Sinwar
  • In all honesty, there are a few outcomes that are potentially worse if he is dead: Hamas splintering into many smaller factions, or treating him as a silent leader and refusing to release hostages because "he hasn't ordered it".

    Hopefully Hamas will confirm and whoever replaces him will agree to release the hostages.

    11
  • https:// www.reuters.com /world/middle-east/16-dead-israeli-strike-lebanese-municipality-building-2024-10-16/

    > The Israeli military said on Thursday that it is investigating the possibility that it has killed Hamas leader Yahya Sinwar, one of the masterminds of the devastating Oct. 7, 2023 attack on Israel that triggered the Gaza war. > > At this stage, his identity cannot be confirmed, said the military. > > Hamas has not commented on the fate of Sinwar, who was recently elevated to paramount leader of the Palestinian militant group.

    11
    Jump
    U.S. to send air defense system and troops to Israel
  • Iran is pretty fucking transparent with their goal: to destroy the Zionist entity. The posters literally say "wiping Israel off the face of the Earth is just the beginning". And no, they don't mean "dismantle the state mechanism" like some users here claim. They very much mean it in the "death to the Jews" way.

    Framing it as purely defensive is just lying

    -7
  • Jump
    Exclusive: Hezbollah running out of money amid Israeli bombardment
  • Sanctions have not been effective - AQAH has been sanctioned since 2007, and only the direct military threat on Iranian planes bringing cash seems to be having the desired impact.

    The quiet part is here in the details - Iran is Hezbollah's financier - confirming what everyone has known for decades. AQAH is unlicensed, yet they do business with AQAH because they know that someone (Iran) will guarantee AQAH's debts. More importantly, it shows a path forward for Lebanon - to simply enforce their existing sovereignty and laws - punishing banks that do business with unlicensed banks.

    5
  • Jump
    Tim Walz calls for scrapping of electoral college to decide US presidential race
  • The electoral college is good for one thing and one thing only: boosting confidence that election fraud in one place won't impact the result of the election.

    Winner takes all was always stupid and needs to be replaced with proportional allocation, preferably with a more direct ratio to the actual population of votes. Basically, everyone doing what Nebraska and Maine do.

    12
  • Jump
    US antitrust case against Amazon to move forward
  • If you only look at the US (which a US court should) - it's really between Chrome and Safari Mobile, and it's a pretty even split to be honest - a bit in the favor of safari for mobile traffic, which is telling.

    But the bigger issue is that they have undue influence in technical decisions to the detriment of consumers because they have a vertically integrated business.

    4
  • Jump
    Israel drops 'depleted uranium bombs' inside Beirut: Official
  • Plausible yes. Painting it as if it were doctrine is not.

    DU is toxic and radioactive, but the radioactivity is stopped by a literal sheet of paper. So the article is just panic inducing propaganda intended for people who want yet another reason to hate on Israel

    EU source regarding the radioactivity of DU munitions: https://ec.europa.eu/health/scientific_committees/opinions_layman/depleted-uranium/en/index.htm

    -2
  • Jump
    Analysis: Ukraine Receives Israeli Air Defense Early Warning System
  • From what I understood, the radar systems were incompatible and that's why despite it being on the table it wasn't sold to the Ukrainians. That and the requirement to gather accurate surveys of the areas to be protected.

    5
  • Jump
    Unix Rules
  • Most AIs are trained on older poster art like this - they're well labelled, have consistent style, and because they're older there are likely to be a bunch of duplicates in the training set.

    12
  • Jump
    Packet Loss
  • None built in from what I recall. That was from back in 2011, so it's possible things changed since.

    Reading through, it looks like retries do exist, but remember that duplicate packets are treated as a window reset, so it's possible that transmission succeeded but the ack was lost.

    I remember the project demos from the course though - one team implemented some form of fast retry on two laptops and had one guy walk out and away. With regular wifi he didn't even make it to the end of the hall before the video dropped out. With their custom stack he made it out of the building before it went.

    I'll need to dig through to find the name of what they did.

    6
  • Jump
    What comes next for Iran after strike on Israel?
  • Small strikes against any IRGC personnel stationed outside Iran - they're fair game and on the table. We're already seeing this with the strikes on Damascus and throughout Lebanon.

    Also - based on the saber rattling and talking heads, it sounds like there are likely to be three potential targets: the dams, which would cause massive domestic economic damage to Iran; the oil facilities, which would cause massive economic damage to the Iranian regime; finally, known nuclear sites, which are in line with Israeli rhetoric about preventing Iranian nuclear ambitions.

    I think cooler heads will prevail and the dams won't be targeted, and without a regional coalition committed to a ground invasion with a goal of regime change, attacking the nuclear facilities won't have the strategic impact that's desired. Which leaves the oil refineries - there's a natural bottleneck for Iranian oil production/export so there's a short list of physical areas that need to be attacked for it to be effective.

    Thinking on it further, IRGC headquarters should also be on the table. I don't think it's likely, but if it succeeds (and it's likely to succeed - especially with direct US support) then it's a huge win. But even if it does succeed I don't see it leading to real regime change in Iran, so without that strategic impact it's far less likely.

    3
  • Jump
    Packet Loss
  • To be fair, because of window size management it only takes 1% packet loss to cause a catastrophic drop in speed.

    Packet loss in TCP is only ever handled as a signal of extreme network congestion. It was never intended to go over a lossy link like wifi.

    30
  • apnews.com Hezbollah hits back with more than 100 rockets across a wider and deeper area of Israel

    Some rockets landed near the city of Haifa, as Israel and Hezbollah appeared to be spiraling toward all-out war following months of escalating tensions.

    > Hezbollah’s deputy leader Naim Kassem said Sunday that his group is now in an open-ended battle with Israel and he threatened more displacement for people in Israel’s north.

    8
    apnews.com Family confirms death of Israeli-American hostage Hersh Goldberg-Polin

    The family of Israeli-American hostage Hersh Goldberg-Polin says he has been killed in the Gaza Strip.

    > The family of Israeli-American hostage Hersh Goldberg-Polin announced the young man’s death early Sunday, ending a relentless campaign by his parents to rescue him that included meetings with world leaders and an address to the Democratic convention last month. > > Goldberg-Polin, 23, was seized by militants at a music festival in southern Israel on Oct. 7. The native of Berkeley, California, lost part of his left arm to a grenade in the attack. In April, a Hamas-issued video showed him, his left hand missing and clearly speaking under duress, sparking new protests in Israel urging the government to do more to secure his and others’ freedom.

    22

    > 103 of the 251 hostages abducted by Hamas on October 7 remain in Gaza, including the bodies of 33 confirmed dead by the IDF.

    > Hamas is also holding two Israeli civilians who entered the Strip in 2014 and 2015, as well as the bodies of two IDF soldiers who were killed in 2014.

    5

    The game was first suspended due to weather on June 26th, and Danny Jansen was traded back in July. The game resumed on August 26th - with him now playing for the other team.

    6
    apnews.com Israel rescues a hostage found alone in an underground tunnel in Gaza

    The Israeli military said that Qaid Farhan Alkadi, 52, was rescued “in a complex operation in the southern Gaza Strip.”

    > The 52-year-old is from Israel’s Arab Bedouin minority and was working as a guard at a packing factory in Kibbutz Magen, one of several farming communities that were attacked on Oct. 7.

    5
    apnews.com Israelis stage heavy airstrikes in Lebanon and Hezbollah launches drone attack on Israel

    Israel has launched a series of intense airstrikes in southern Lebanon in what it called a pre-emptive strike against the Hezbollah militant group, threatening to trigger a broader regionwide war that could torpedo efforts to forge a cease-fire in Gaza.

    Hezbollah has launched 320 rockets at Israel in the last two hours, alongside at least dozens of drones, but no exact number on the drones. Those numbers are based on a single source, so please take the number with a grain of salt - this source is generally correct, but it is a single source publishing those numbers.

    2 injured so far, and extensive damage to civilian homes and infrastructure.

    2
    apnews.com Iranian hackers targeted WhatsApp accounts of staffers in Biden, Trump administrations, Meta says

    The same Iranian hacking group believed to have targeted both the Democratic and Republican presidential campaigns have tried to go after the WhatsApp accounts of staffers in the administrations of President Joe Biden and former President Donald Trump.

    > The same Iranian hacking group believed to have targeted both the Democratic and Republican presidential campaigns tried to go after the WhatsApp accounts of staffers in the administrations of President Joe Biden and former President Donald Trump, Meta Platforms said Friday.

    2
    apnews.com Israeli military says it has recovered the bodies of 6 hostages in a Gaza operation

    The Israeli military says it has recovered the bodies of six hostages taken in Hamas’ Oct. 7 attack that started the war in Gaza.

    > Yagev Buchshtab, Alexander Dancyg, Avraham Munder, Yoram Metzger, Nadav Popplewell and Haim Perry

    39
    edition.cnn.com At least 11 people injured after projectiles reportedly fired from Lebanon into Israel | CNN

    At least 11 people have been injured after projectiles were reportedly fired from Lebanon into Majdal Shams, Golan Heights, on Saturday, according to Israel.

    From the photos on twitter, it looks like it hit the only soccer field in town, landing between the field and the playground next to it. Hezbollah first claimed the attack, but now that there are 10 kids dead, and another several dozen kids injured they've backpedaled on it.

    archive link

    UPDATE: 10 dead, 6 in critical, 3 moderate, 4 light, and several dozen unadmitted injured people

    36
    edition.cnn.com Israeli airstrikes target Yemen’s Houthis day after deadly drone attack in Tel Aviv | CNN

    Yemen’s Houthi rebels have blamed Israel after a series of strikes hit

    > “A short while ago, IDF fighter jets struck military targets of the Houthi terrorist regime in the area of the Al Hudaydah (Hodeidah) Port in Yemen in response to the hundreds of attacks carried out against the state of Israel in recent months,” the Israel Defence Forces (IDF) said in a statement.

    > The strikes on Hodeidah came a day after a drone attack in Tel Aviv killed one man and injured at least 10 others.

    archive link

    5
    apnews.com Air attack leaves 1 dead, at least 10 injured in Tel Aviv

    It was not immediately clear how the strike evaded Israel’s air defenses or how Israel might respond.

    > injuring at least 10 people and leaving one dead

    > Yemen’s Houthis have repeatedly launched drones and missiles toward Israel throughout the nine-month-long war, in sympathy with Hamas. But until Friday, all were intercepted by either Israel or Western allies with forces stationed in the region.

    AP for what ever reason have decided that noone has claimed responsibility, yet include several paragraphs about the Houthis.

    From Reuter's coverage:

    > The military spokesman of Yemen's Houthi militants, which like Hezbollah are backed by Iran, said on the X social media website that the group would reveal details about a military operation that targeted Tel Aviv.

    archive link

    5
    apnews.com Israel rescues 4 hostages kidnapped in a Hamas-led attack on Oct. 7.

    Israel says it has rescued four hostages who were kidnapped in a Hamas-led attack on Oct. 7. The army said it rescued Noa Argamani, 25, Almog Meir Jan 21, Andrey Kozlov 27, and Shlomi Ziv (40), in a complex special daytime operation in Nuseirat.

    > Israel said Saturday it rescued four hostages who were kidnapped in a Hamas-led attack on Oct. 7. > > The army said it rescued Noa Argamani,25, Almog Meir Jan 21, Andrey Kozlov 27, and Shlomi Ziv (40), in a complex special daytime operation in Nuseirat.

    6

    > Iran on Saturday night launched a large wave of attack drones from its territory toward the Jewish state, in the first-ever direct attack on Israel by the Islamic Republic, with warning sirens activated in Israeli communities throughout the country early Sunday as the military worked to intercept the Iranian aircraft.

    ! > Footage of the Iranian attack over Jerusalem's Temple Mount/Haram al-Sharif

    17
    www.bbc.com UNRWA Hamas attack claims: UK becomes latest country to pause funding for agency

    The UK government is "appalled" by allegations UNRWA staff were involved in 7 October attacks.

    > "The UK is appalled by allegations that UNRWA staff were involved in the 7 October attack against Israel, a heinous act of terrorism that the UK Government has repeatedly condemned," the UK Foreign Office said in a statement. > > "The UK is temporarily pausing any future funding of UNWRA whilst we review these concerning allegations," it added.

    11
    https:// www.reuters.com /world/italy-suspends-financing-unrwa-foreign-minister-tajani-2024-01-27/

    > The decision follows allegations that some UNRWA workers were involved in the Oct. 7 attacks in Israel carried out by Palestinian militant group Hamas.

    The [actual tweet][x]:

    >The Italian government suspended funding @UNRWA after the atrocious attack by Hamas against Israel on 7 October. Allied countries have recently made the same decision. We are committed to humanitarian assistance to the Palestinian population, protecting Israel's security.

    [x]: https://twitter.com/Antonio_Tajani/status/1751168542790009207

    Other coverage of Italy's responses to the revelation that at least 12 UNRWA employees actively participated and used UNRWA facilities and vehicles in the staging and immediate aftermath of October 7th:

    • [Times of Israel][toi]
    • [Jerusalem Post][jpost]
    • [Al Arabiya][al-arabiya]
    • [Politico][politico]
    • [Times of India][times-of-india]

    [AP has more background][ap], but hasn't picked up on Italy yet.

    [toi]: https://www.timesofisrael.com/liveblog_entry/italy-joins-countries-suspending-financing-for-unrwa/ [jpost]: https://www.jpost.com/breaking-news/article-783950 [al-arabiya]: https://english.alarabiya.net/News/middle-east/2024/01/27/Australia-Canada-suspend-UNRWA-funding-after-Israeli-allegations [politico]: https://www.politico.eu/article/italy-canada-australia-united-states-funding-unrwa-united-nations-hamas-israel/ [times-of-india]: https://m.timesofindia.com/world/europe/italy-suspends-financing-for-unrwa-foreign-minister-antonio-tajani/articleshow/107185034.cms [ap]: https://apnews.com/article/israel-hamas-war-news-01-26-2024-2cd0b3c7b7efe5f0dfc03346e86b773b

    9
    abcnews.go.com Exclusive: US to bring back aircraft carrier from eastern Mediterranean

    Exclusive: The USS Gerald R. Ford aircraft carrier strike group will leave the eastern Mediterranean Sea in the "coming days," two U.S. officials tell ABC News.

    > The USS Gerald R. Ford aircraft carrier strike group will leave the eastern Mediterranean Sea, where it was sent just after the start of the Israel-Hamas war in October, in the "coming days," two U.S. officials tell ABC News. > > A senior U.S. official and a U.S. official told ABC News that in the "coming days," the carrier and other surface ships that make up the strike group will return to the carrier's home port of Norfolk, Virginia, as originally scheduled so it could prepare for future deployments.

    9