Kev Dwyer (@[email protected])

3.8K posts

Kev Dwyer (@snakecharmerb@mastodon.cloud)

Kev Dwyer (@[email protected])

@snakecharmerb

The Road of Excess leads to the Palace of Wisdom.

Norwich UK Katılım Mart 2010
733 Takip Edilen138 Takipçiler
nolen
nolen@itseieio·
every 3 months i remember that my terminal is normally in "cooked mode" but it can also be in "raw mode" and i lose my mind
nolen tweet media
English
9
12
388
17.6K
Kev Dwyer (@snakecharmerb@mastodon.cloud)
Kev Dwyer (@[email protected])@snakecharmerb·
@raymondh @property How does this square with the concept of using \@property for cases when simple attribute access changes to something more complex? For example we start with price but move to price + time_of_day_premium (where time_of_day_premium is some arbitrarily complex calculation)?
English
2
0
0
552
Raymond Hettinger
Raymond Hettinger@raymondh·
#Python design tip: Only use @property for O(1) operations. People rightly expect that anything that looks like attribute access is fast. Don't want to Cntl-C out of an attribute lookup that Deep Thought takes 7.5 million years to compute: >>> life.meaning 42
English
9
9
116
12.9K
Dr Francis Young
Dr Francis Young@DrFrancisYoung·
@jtheleast I shared a Ryanair flight with a former Home Secretary last year, hard to imagine the mighty falling harder than that
English
4
1
11
2K
Kev Dwyer (@snakecharmerb@mastodon.cloud)
Kev Dwyer (@[email protected])@snakecharmerb·
@ericries In my short career in corporate junior management I was told to keep one "lemon" on the team so that I had someone to sacrifice when the axemen came calling. Not something I ever felt entirely ok with, tbh.
English
0
0
0
12
Eric Ries
Eric Ries@ericries·
In corporate management, there's a ritual called the "Dance of the Lemon." Mediocre employee? Instead of dealing with it, management quietly transfers them to another department. Coherence means having the courage to stop the music.
English
5
0
5
1.2K
Robb Allen
Robb Allen@ItsRobbAllen·
Story time about the worst code I've ever seen. I am going to tell you about it, and I honest-to-God would not blame you if you thought I was making it up. I started a new job. One of the first things they wanted me to look at was why it took several minutes for a single grid to load on an Angular page. This was original AngularJS, by the way. When I tried to load the JavaScript code behind, every here and there it would crash Visual Studio. You had to be very careful that you didn't have anything else opened because the file was so large it ate up all the memory. The horizontal scroll bar was as thin as it could be, and you had to be careful trying to drag to the right because it, too, could crash Visual Studio. The page had a grid on it, and instead of data binding like you normally would do with Angular, they had written if-then statements for every permutation of every column order and visibility that there could be. When they added a new column, they had to go in and code every possible combination of visibility and order in conjunction with every other possibility that could have ever happened. It got worse. Much, much worse. Again, ignoring the data binding that is built into Angular, in order to detect when a user clicked on a cell, they would take the xy coordinates of the mouse click and then calculate which column and row was probably clicked on so they could edit it. They literally had to keep track of where you scrolled to in order to try to figure out which column was under the mouse when you clicked. It was not always correct, and by not always I mean generally got it wrong. Once they calculated which cell you probably were clicking, they then had to do a lookup on the root data to see which field it pointed to. It would then send that data back to the server and cause the screen to refresh, taking another 2-3 minutes to load. Did I mention the calculation of which field was clicked was often wrong? And that it would send the wrong data to be updated? Oh, and they had assigned console to null because there were so many errors that it would cause the browser to stop responding. Which I only found out as I was trying to troubleshoot and add logging. To this day, I do not understand how anyone ever could have written something so poorly performing and put it in front of somebody and say, "I'm done." And yes, it was offshore.
F.O.L.A@folaoftech

They told him to refactor line 6061. It’s a 13k-line function, RIP.🪦 🤣🤣

English
54
88
3.2K
232.6K
DAISY CUTTER
DAISY CUTTER@daisycutterzine·
what/who is the skill scale graphic actually for? sure there's a methodology behind the numbers but for broadcast purposes i.e. the viewer at home what value is it adding to have these numbers 😭 like okay "threat 65%" what does that mean, what are we taking from that
English
5
5
25
1.9K
Justin Buro
Justin Buro@aether_boye·
@Alicoh1 "Man won't fly for a million years" was a common sentiment in the 1800s, and it only took to the 1900s to disprove. I'm not saying we'll have our warp drive in the 2100s, but I wouldn't personally be TOO overly surprised
English
1
0
1
252
Chris 🇺🇲💦🍑
Chris 🇺🇲💦🍑@Alicoh1·
the speed of light is a hard limit and any sci-fi future that involves FTL travel or even communication is simply off the table for our species.
English
1.3K
141
5.6K
3.5M
Brooks Otterlake
Brooks Otterlake@i_zzzzzz·
I'm very curious how the Plex description of Seinfeld ended up being this particular sequence of words
Brooks Otterlake tweet media
English
29
145
3.7K
89.3K
Will McGugan
Will McGugan@willmcgugan·
Do me a favor. Run this in the Python REPL, and paste a screenshot. print('1\u200d2') Try on more than one terminal, if you have them installed.
English
23
3
44
27.6K
𓆉
𓆉@khyonfilm·
girl i wanna learn mandarin but idk where to start can someone send me their good resources
GIF
English
184
833
12.7K
480.6K
Kev Dwyer (@[email protected]) retweetledi
Arnaud Bertrand
Arnaud Bertrand@RnaudBertrand·
This strange square 👇 is undoubtedly the most extraordinary work of literature in human history. Yet, unfortunately, barely anyone in the West has ever heard of it. There was this woman poet in 4th century China called Su Hui (蘇蕙), a child genius who had reportedly mastered Chinese characters by age 3. At 21 years old, heartbroken by her husband who left her for another woman, she decided to encode her feelings in a structure so intricate, so beautiful, so intellectually staggering that it still baffles scholars to this day. Came to be known as the Xuanji Tu (璇璣圖) - the "Star Gauge" or "Map of the Armillary Sphere" - it's a 29 by 29 grid of 841 characters that can produce over 4,000 different poems. Read it forward. Read it backward. Read it horizontally, vertically, diagonally. Read it spiraling outward from the center. Read it in circles around the outer edge. Each path through the grid produces a different poem - all of them coherent, all of them beautiful, all of them rhyming, all of them expressing variations on the same themes of longing, betrayal, regret, and undying love. The outer ring of 112 characters forms a single circular poem - believed to be both the first and longest of its kind ever written. The interior grid produces 2,848 different four-line poems of seven characters each. In addition, there are hundreds of other smaller and longer poems, depending on the reading method. At the center a single character she left implied but unwritten: 心 (xin) - "heart." Later copyists would add it explicitly, but in Su Hui's original the meaning was even more beautiful: 4,000 poems, all orbiting the space where her heart used to be. Take for instance the outer red grid of the Star Gauge. Starting from the top right corner and reading down, you get this seven-character quatrain: 仁智懷德聖虞唐, 貞志篤終誓穹蒼, 欽所感想妄淫荒, 心憂增慕懷慘傷。 In pinyin, it is: Rén zhì huái dé shèng yú táng, zhēnzhì dǔ zhōng shì qióng cāng, qīn suǒ gǎnxiǎng wàng yín huāng, xīn yōu zēng mù huái cǎn shāng. Notice how it rhymes? táng / cāng / huāng / shāng The rough translation in English is: "The benevolent and wise cherish virtue, like the sage-kings Yao and Shun, With steadfast will I swear to the heavens above, What I revere and feel - how could it be wanton or dissolute? My heart's sorrow grows, longing brings only grief." Now read it from the bottom to the top and you get this entirely different seven-character quatrain: 傷慘懷慕增憂心, 荒淫妄想感所欽, 蒼穹誓終篤志貞, 唐虞聖德懷智仁。 The pinyin: Shāng cǎn huái mù zēng yōu xīn, huāngyín wàngxiǎng gǎn suǒ qīn, cāngqióng shì zhōng dǔzhì zhēn, táng yúshèngdé huái zhì rén. It rhymes too: xīn and qīn, zhēn and rén And the meaning is just as beautiful and coherent: "Grief and sorrow, longing fills my worried heart, Wanton and dissolute fantasies - is that what you revere? I swear to the heavens my constancy is true, May we embody the sage-kings' virtue, wisdom, and benevolence." That's just 2 poems out of the over 4,000 you can construct from the Xuanji Tu! At the very center of the grid, the 8 red characters wrapped around the central heart, she "signed" her poem with a hidden message: 詩圖璇玑,始平蘇氏。 "The poem-picture of the Armillary Sphere, by Su of Shiping." Or reversed: 蘇氏詩圖,璇玑始平。 "Su's poem-picture - the Armillary Sphere begins in peace." Many scholars, and even emperors, throughout Chinese history have been completely obsessed by Su Hui's puzzle. For instance, in the Ming dynasty, a scholar named Kang Wanmin (康萬民) devoted his entire life to the poems (kangshiw.com/contents/461/2…), ending up documenting twelve different reading methods - forward, backward, diagonal, radiating, corner-to-corner, spiraling - and extracting 4,206 poems. His book on the subject ("Reading Methods for the Xuanji Tu Poems", 璇璣圖詩讀法) runs to hundreds of pages. Empress Wu Zetian herself, the legendary woman emperor of the Tang dynasty, wrote a preface to the Xuanji Tu around 692 CE (baike.baidu.com/item/%E7%BB%87…). Incredibly, there's even far more complexity to the Xuanji Tu than just the poems: - The name 璇玑 (Xuanji) - Armillary Sphere - is astronomical in meaning and the way the poems can be read mirrors the way celestial bodies orbit around a fixed center. It's a model of the heavens. - Her original work, with the characters woven on silk brocade, was in five colors (red, black, blue/green, purple, and yellow) which correspond to the Five Elements (五行) - the foundational Chinese philosophical system that explains how the universe operates. So it's also a model of the entire cosmic order according to ancient Chinese philosophy. - It's also of course deeply mathematical with this 29 x 29 perfect square grid, with sub-squares, lines and rectangles, and a structure which allows for symmetrical reading patterns in all directions - Last but not least, the content of the poems themselves contain multiple registers. On top of expressing her personal grief and longing for her husband, it's also filled with accusations against the concubine (Zhao Yangtai) he left her for, reflections on politics (with many references to sage-kings) and philosophical reflections. So the Star Gauge is simultaneously: - A love letter (expressing personal longing) - A legal brief (arguing her case against her rival) - A cosmological model (structured like the heavens) - A Five Element diagram (encoding the fundamental structure of the world according to ancient Chinese philosophy) - A mathematical construction with perfect symmetry and precision And yet, for all this complexity, we should not forget this was all ultimately in service of the simplest human message imaginable: a 21-year-old woman asking the love of her life "come back to me". Her husband did, eventually. According to what empress Wu Zetian herself wrote in her preface to the Xuanji Tu, when he received Su's brocade he was so "moved by its supreme beauty" that he sent away his concubine and returned to his wife. As the story goes, they lived together until old age. The heart at the center was filled after all.
Arnaud Bertrand tweet mediaArnaud Bertrand tweet media
English
593
7.5K
37.6K
3.3M
Kev Dwyer (@[email protected]) retweetledi
“paula”
“paula”@paularambles·
Consider, if you will, this peculiar Silicon Valley confession: “I worked for 36 hours with no sleep. Although I was dead, I also felt energized. I even fell asleep a few times while driving home in my Cybertruck, but fsd came in clutch. Happy thanksgiving.” People read this and say, “Wow, so crazy.” No. This is not crazy. This is ideology speaking in the first person. Look at what he is really proud of. Not what he built, not the result. He is proud of his own exhaustion. He whips himself and calls it self-actualization. Before, the saint starved in the cave for God. Now, the engineer fasts from sleep for the billionaire. And the best part, the truly obscene part, is the drive home. Here the machine steps in as what Lacan would call the big Other, the big adult in the room that keeps going while you collapse. You can be unconscious, half-dead, and still you are “productive,” because the car does the driving, the system does the watching. You close your eyes, the algorithm stays awake. But notice the ideological twist: rather than confronting the absurdity of a society where one works until unconsciousness, the narrative is inverted. The same system that squeezes him until he is sleeping at the wheel also appears as his savior. This is pure capitalism. First it injures you, then it sells you the bandage, and you say thank you. You wreck yourself for one of the billionaire’s machines, then another one of his machines rescues your body on the drive home. Which brings us to the “Happy Thanksgiving.” It is the final twist of the knife. Gratitude here is not for rest, or sanity, or enough sleep to drive safely. Gratitude is for the privilege of being exhausted in the right office, in the right hoodie, for the right man. You give thanks to the very structure that wears you down. It is like saying grace over your own burnout. Thus the man who naps on the freeway is not a deviation. He is the ideal subject of our time. Half-alive, overworked to the point of being a public hazard, and then thanking the machine that keeps this madness just barely on the road. The system grinds him down, risks his life and the lives of everyone around him, and his reaction is not “this cannot go on,” but “I am so grateful.” In this one man in a Cybertruck you get the whole picture at once: exploitation, technology and holiday cheer condensed into a single, obedient “thank you.”
“paula” tweet media
English
127
705
6.4K
351K
Kev Dwyer (@snakecharmerb@mastodon.cloud)
Kev Dwyer (@[email protected])@snakecharmerb·
@wearykevin19 @stephancasas I would guess in the early 2000s Python switched from being a "glue" or "scripting" language (as it was described in the venerable books) to a first class language, primarily for web programming. Startup culture of the time valued speed of development/change over performance.
English
0
0
1
80
Kevin A
Kevin A@wearykevin19·
@stephancasas All of the venerable Python books from the 90s and early 2000s had the same advice: prototype in Python, and replace modules where you needed more performance with C where needed. It encouraged profiling and thought. When did that advice go away?
English
2
4
52
4.7K
Thomas Ip
Thomas Ip@_thomasip·
@1st1 when did uuid7 got into stdlib? last I checked I still had to pull in a third-party library.
English
1
0
4
1.8K
Yury Selivanov
Yury Selivanov@1st1·
I promised to speed up UUID in Python 100x but was only able to deliver pesky 30x... 💀 The performance of Python's UUID will be on par with Bun and NodeJS, and I really don't think it's possible to make them generate any faster (random is the bottleneck now) PR link below 🧵
Yury Selivanov tweet media
English
32
36
931
71.6K
Dr Francis Young
Dr Francis Young@DrFrancisYoung·
There seems to be an increasing crossover between self-proclaimed microstates, unconventional ideas of sovereignty and cults, cf. the weird Chelmsford case that involved a sort of quasi-juridical cult bbc.co.uk/news/articles/…
English
1
0
6
1.3K
Dr Francis Young
Dr Francis Young@DrFrancisYoung·
This will be a news story of interest to connoisseurs of self-proclaimed microstates: "The group claimed ancestral rights to land and insisted that the Kingdom of Kubala had been born." bbc.co.uk/news/articles/…
English
3
2
25
3.1K
Kev Dwyer (@[email protected]) retweetledi
Peter Gillibrand
Peter Gillibrand@GillibrandPeter·
The Japanese ambassador to the UK wishes everyone a happy St David’s Day with a Welsh cake and daffodil origami. Protect this man at all costs.
English
547
4.3K
64.1K
3.7M