RSSAmplifier

Blog

Kzone

kemenaran.winosx.comRSS feed ↗10 posts

Latest posts

Literate programming in Ruby

In 2012, I was handled a small programming challenge. I decided to solve it in Ruby, using literate programming . The challenge This small programming challenge was proposed by a defunct SSII company ( original source ): Challenge #3 – Apps wall In our offices, we display a mosaic of the most downloaded apps from the App Store on a screen. To prevent the TV’s pixels from burning out, it’s…

Asynchronous method calls using Rails’s ActiveJob

ActiveJob is great – but every time you need to perform some kind of delayed execution, you need to create a new job class for it. Something like: class DestroyAccountJob < ActiveJob def perform ( account ) account . destroy! end end # In the code, this will be used like: DestroyAccountJob . perform_later ( account ) And ideally, the job #perform method should fit on a single line: no complex code…

Game Boy assembly : halt-synchronization

“ halt -synchronization” is a Game Boy (and Game Boy Color) assembly programming trick. I have seen it referenced in many places, but rarely explained thoroughly. So here it is. The problem Let’s say your game needs to copy some data to the Game Boy Video-RAM (maybe some tiles, or background maps, palettes, OAM data, whatever). But the Video-RAM is locked during rendering, and unlocks only at…

Fiche de lecture : « Au commencement était… – Une nouvelle histoire de l’humanité »

Je viens de finir « Au commencement était… – Une nouvelle histoire de l’humanité », le dernier bouquin co-écrit par David Graeber . Un beau pavé, fascinant. La thèse du bouquin en très court : historiquement, l’être humain est bien plus doué que ce qu’on pense pour inventer toutes sortes de systèmes politiques très différents les uns des autres. Les conditions matérielles ne déterminent pas les…

Crafting Enumerator helpers in Ruby

Among all the powerful abilities of Ruby Enumerators, one of their most useful usage is to customize what gets enumerated. For instance, by default #each will yield the elements of the enumeration, one by one: array = [ "apple" , "banana" , "grape" ] array . each do | value | puts "${value}" end # "apple" # "banana" # "grape" In some cases, however, we may also need the index of the element being…

Exploring Rails codebases: Writebook

To become a better developer, they say, read a lot of code. Although we, as a profession, often find more enjoyable to write a hundred lines of code rather than read ten, this advice stands more than ever. So let’s explore some codebases, starting with Rails applications. Last june, 37signals released a new product, Writebook – free of charge, and full source code included 1 . An excellent…

Véligo cargo : dimensions des caisses

En cherchant un siège-enfant qui rentre dans un Véligo cargo, je me suis rendu compte qu’il était difficile de trouver en ligne les dimensions précises de la caisse de chaque vélo (biporteur ou triporteur). Voici donc les relevés des dimensions de chaque caisse. Véligo biporteur Véligo triporteur

Zelda: Link's Awakening progress reports moved to a new location

After two years of waiting, a new progress report for the Zelda: Link’s Awakening disassembly is finally published ! To celebrate this, I took the time to move this series of articles to its own dedicated website: the Link’s Awakening disassembly blog . Of course, the former URLs now redirect to these new pages. This move makes subscribing to new disassembly-related articles easier, since only…

Paris mon camarade – Bernard Dimey

Un poème de Bernard Dimey , que j’ai eu du mal à trouver facilement en ligne : Paris, mon camarade, pour causer, faut connaître, Faut s’y prom’ner la nuit, faut s’y fair’ des copains, Faut s’offrir du bitume, en faire des kilomètres, Y’aura toujours un pote pour t’offrir un bout de pain. Paris, si tu connais c’est comme un’ cour d’école, T’es tout partout chez toi si t’as l’coeur bien placé, Si…

Zelda: Link’s Awakening Turbo-Français

La traduction française de Zelda: Link’s Awakening a un charme particulier. Le texte de Véronique Chantel est plein de rimes, raccourcis, bizarreries et étrangetés, qui collent parfaitement à l’esprit « Twin Peaks » du jeu. Tout cela en respectant les contraintes techniques de la Game Boy, qui obligeait par exemple le texte français à être à peu près de la même longueur que le texte anglais ou…