<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Escacs on Christian Martínez De La Rosa</title><link>https://christt105.github.io/ca/tags/escacs/</link><description>Recent content in Escacs on Christian Martínez De La Rosa</description><generator>Hugo -- gohugo.io</generator><language>ca</language><lastBuildDate>Sun, 23 Aug 2026 00:00:00 +0200</lastBuildDate><atom:link href="https://christt105.github.io/ca/tags/escacs/index.xml" rel="self" type="application/rss+xml"/><item><title>Chess &amp; Friends: una web per portar el compte de les pallisses que em donen els meus germans als escacs</title><link>https://christt105.github.io/ca/blog/chess-and-friends/</link><pubDate>Sun, 23 Aug 2026 00:00:00 +0200</pubDate><guid>https://christt105.github.io/ca/blog/chess-and-friends/</guid><enclosure url="https://christt105.github.io/blog/chess-and-friends/cover.webp" length="71956" type="image/webp"/><description>&lt;p&gt;Hola de nou.&lt;/p&gt;&#10;&lt;p&gt;Els meus germans són uns frikis dels escacs, la majoria de vegades que els veig estan jugant partides o mirant vídeos. Jo hi jugo molt de tant en tant, sempre m&amp;rsquo;ha agradat, però això, un aficionat que juga alguna partida ocasional. De tant en tant els meus germans em reten a una partida i sempre acaba igual, pallissa.&lt;/p&gt;&#10;&lt;p&gt;L&amp;rsquo;altre dia la meva germana em va enviar per Discord, sense venir gaire a tomb, un gràfic de precisió de les nostres últimes partides que s&amp;rsquo;havia tret no sé molt bé d&amp;rsquo;on. La veritat és que el gràfic és lamentable, va ser pitjor que perdre la partida en si. Però em va donar una idea: en lloc d&amp;rsquo;un gràfic solt, per què no alguna cosa més viva, que es anés actualitzant sola?&lt;/p&gt;&#10;&lt;p&gt;&lt;img class="gallery-image" data-flex-basis="439px" data-flex-grow="183" height="485" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://christt105.github.io/blog/chess-and-friends/Chart.webp" srcset="https://christt105.github.io/blog/chess-and-friends/Chart_hu_936c5ee92dd7f8b8.webp 800w, https://christt105.github.io/blog/chess-and-friends/Chart.webp 889w" width="889"&gt;&lt;/p&gt;&#10;&lt;h2 id="mans-a-lobra"&gt;Mans a l&amp;rsquo;obra&#10;&lt;/h2&gt;&lt;p&gt;Chess.com té una API pública sense necessitat de clau ni de res estrany: per cada jugador pots demanar l&amp;rsquo;arxiu de partides d&amp;rsquo;un mes concret i et retorna, entre altres coses, la precisió de cada bàndol quan està disponible (des de ~2023 chess.com la calcula per a gairebé totes les partides). Amb això com a base, el pla era una web senzilla que anés a buscar les partides entre nosaltres i les pintés en un parell de gràfics.&lt;/p&gt;&#10;&lt;p&gt;Ho vaig plantejar a Claude tal qual, amb el que volia i poc més, i a partir d&amp;rsquo;aquí va ser qüestió d&amp;rsquo;anar iterant: un script en Node que pega a l&amp;rsquo;API i guarda un &lt;code&gt;games.json&lt;/code&gt;, una web estàtica que ho llegeix i ho pinta amb Chart.js, i ja posats, que li donés un aire de tauler d&amp;rsquo;escacs en lloc de la típica web genèrica. Vam anar afinant coses pel camí: cachejar els mesos ja tancats per no repetir peticions de més, una icona diferent segons com va acabar cada partida (escac i mat, rendició, temps, taules), i una GitHub Action que s&amp;rsquo;executa cada nit per refrescar les dades sola, així que la web mai necessita que jo la toqui per estar al dia.&lt;/p&gt;&#10;&lt;a class="github-repo-card" href="https://github.com/christt105/chess-and-friends" target="_blank" rel="noopener"&gt;&#10; &lt;img src="https://avatars.githubusercontent.com/u/36189169?v=4" alt="christt105 avatar" class="repo-avatar"&gt;&#10; &lt;h3&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"&gt;&#10; &lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&#10; &lt;path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /&gt;&#10;&lt;/svg&gt;&#10;&#10;&#10; christt105/chess-and-friends&lt;/h3&gt;&#10; &lt;p&gt;&lt;/p&gt;&#10; &lt;div class="repo-stats"&gt;&#10; &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-star"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z" /&gt;&lt;/svg&gt; 0&lt;/span&gt;&#10; &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-git-fork"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M10 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M5 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M15 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" /&gt;&lt;path d="M12 12l0 4" /&gt;&lt;/svg&gt; 0&lt;/span&gt;&#10; &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-calendar-event"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /&gt;&lt;path d="M16 3l0 4" /&gt;&lt;path d="M8 3l0 4" /&gt;&lt;path d="M4 11l16 0" /&gt;&lt;path d="M8 15h2v2h-2l0 -2" /&gt;&lt;/svg&gt; 2026-08-26&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;/a&gt;&#10;&lt;h2 id="la-web"&gt;La web&#10;&lt;/h2&gt;&lt;p&gt;La teniu publicada aquí: &lt;a class="link" href="https://christt105.github.io/chess-and-friends/" target="_blank" rel="noopener"&#10; &gt;https://christt105.github.io/chess-and-friends/&lt;/a&gt;. Té dues vistes. La individual, amb la meva evolució de precisió i els meus números en solitari:&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Vista individual del dashboard de Chess &amp; Friends" class="gallery-image" data-flex-basis="240px" data-flex-grow="100" height="1400" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://christt105.github.io/blog/chess-and-friends/dashboard-individual.png" srcset="https://christt105.github.io/blog/chess-and-friends/dashboard-individual_hu_d9f021192e2318f0.png 800w, https://christt105.github.io/blog/chess-and-friends/dashboard-individual.png 1400w" width="1400"&gt;&lt;/p&gt;&#10;&lt;p&gt;I la d&amp;rsquo;&amp;ldquo;Amics&amp;rdquo;, que compara tots els que juguem entre nosaltres i afegeix una taula de cara a cara:&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Vista de comparació entre germans a Chess &amp; Friends" class="gallery-image" data-flex-basis="339px" data-flex-grow="141" height="989" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://christt105.github.io/blog/chess-and-friends/dashboard-amigos.png" srcset="https://christt105.github.io/blog/chess-and-friends/dashboard-amigos_hu_dae8f4b3557ec75f.png 800w, https://christt105.github.io/blog/chess-and-friends/dashboard-amigos.png 1400w" width="1400"&gt;&lt;/p&gt;&#10;&lt;p&gt;Res gaire complicat per dins (un HTML, un script de fetch i un altre de dashboard, sense build ni frameworks), però per al que necessitava és exactament el que volia: zero manteniment i amb pinta de projecte de veritat.&lt;/p&gt;&#10;&lt;h2 id="les-pallisses-en-números"&gt;Les pallisses, en números&#10;&lt;/h2&gt;&lt;p&gt;La veritat és que és lamentable, i hauria fins i tot de fer-me vergonya publicar això. Però bé, tant se val, simplement és un joc. Ja ho sospitava, però veure-ho en una taula ben endreçada és un altre nivell d&amp;rsquo;humiliació.&lt;/p&gt;&#10;&lt;h2 id="comiat"&gt;Comiat&#10;&lt;/h2&gt;&lt;p&gt;Un projecte d&amp;rsquo;un matí mentre feia tasques domèstiques, per riure&amp;rsquo;m una mica de mi mateix (mentre escric això ja sento riure els cabrons dels meus germans). L&amp;rsquo;he deixat públic, qualsevol pot clonar el repo i modificar l&amp;rsquo;arxiu de dades per generar la seva pàgina web.&lt;/p&gt;&#10;&lt;p&gt;Fins a la propera.&lt;/p&gt;&#10;&lt;div class="video-wrapper"&gt;&#10; &lt;iframe loading="lazy" &#10; src="https://www.youtube.com/embed/c7BVtGnlxT8" &#10; allowfullscreen &#10; title="YouTube Video"&#10; &gt;&#10; &lt;/iframe&gt;&#10;&lt;/div&gt;&#10;&#10;</description></item></channel></rss>