<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arkan</title>
    <description>The latest articles on DEV Community by Arkan (@arkan501).</description>
    <link>https://dev.to/arkan501</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2653784%2F9848da24-1434-4a2f-9581-3cb3de41c892.png</url>
      <title>DEV Community: Arkan</title>
      <link>https://dev.to/arkan501</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arkan501"/>
    <language>en</language>
    <item>
      <title>The Beginning of My Chess Programming Journey</title>
      <dc:creator>Arkan</dc:creator>
      <pubDate>Mon, 06 Jan 2025 20:29:36 +0000</pubDate>
      <link>https://dev.to/arkan501/the-beginning-of-my-chess-programming-journey-1d3j</link>
      <guid>https://dev.to/arkan501/the-beginning-of-my-chess-programming-journey-1d3j</guid>
      <description>&lt;p&gt;This blog series will serve as my defacto documentation for my chess programming journey. I plan on hosting this on my main &lt;a href="https://dev.to/arkan501"&gt;dev.to&lt;/a&gt;, as well as on Lichess when I get around to it. Though I'm still an infant programmer in the grand scheme of things, I have rather quickly come up with a sort of learning regiment when diving into a new language. Being a college student and having gone through only the basic courses so far, I've found my Data Structures and Algorithms course I took in Spring 2024 very useful in not only building a fairly solid foundation for my programming skills, but also extremely useful when wanting to learn a new language.&lt;/p&gt;

&lt;p&gt;Java is what we were taught with (huge surprise I know), and we learned a few sorting algorithms -- though we never really got around to actually implementing any of these algorithms -- and also the big "four" core data structures as I like to refer to them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Link List&lt;/li&gt;
&lt;li&gt;Queue&lt;/li&gt;
&lt;li&gt;Stack&lt;/li&gt;
&lt;li&gt;Binary Tree&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thankfully, we actually did get to work on some projects that implemented these data structures. The most notable for me was getting to implement a card game utilizing a stack. I won't bore you with all the details from my basic implementation, but I will say it was a great way to dip my toes into game development. I had the opportunity to implement a basic "game loop" where it just asked to keep drawing cards. I was however able to use what I learned during this project, and apply these lessons to my personal project of making a game of Black Jack written in Go.&lt;/p&gt;

&lt;p&gt;I was able to generate multiple decks into a single deck stack, and then shuffle them in a standard pseudo random order seeded by the system time and date. I managed to create a hand -- which I believe I ended up using either a queue or simple slice -- for both one player and the dealer. Then drawing from the deck, I was able to insert the card into the player's hand and then to the dealer's hand. A fairly simple game loop was made and score for both the player and dealer was kept, where a check was implemented so the dealer wouldn't draw after a soft 17 was achieved (don't worry if you aren't too familiar with Black Jack terminology, I won't dwell on this for much longer). There were quite a few more things to implement to make it a fully working game of Black Jack, but I was happy and content with what I had achieved, I may revisit it after achieving the core functionality of my current project. Speaking of which...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginning of my chess journey:&lt;/strong&gt; Like pretty much the majority of everyone else, during the pandemic I took up learning chess as a personal hobby and past time. I'm not as good as I would like to be, and I scoured many online resources and programs that were recommended for improvement. I started off which chess.com and it's analysis tools before I quickly outgrew the basics it provided. I found Lichess, and became much more fond of their UI and feel (I swear it's not because I'm 300 points higher rated there), and their studies are amazing! Although, something was still missing, for as great as the studies tool is, and I do love to use it still, it wasn't resonating much with me for maintaining a much more extensive repertoire.&lt;/p&gt;

&lt;p&gt;Don't worry chess gurus out there, I don't study the openings to death, I focus on my tactics first and foremost. However, I do like being able to have lines mapped out of which ones I encounter the most,  so when I go back and review games later, I can see where exactly things went offtrack or what I missed in a position. It's a great feeling when I don't exactly remember what move my repertoire had, but my intuition in a position helps me find those moves naturally. For this gap I found Chess Tempo, another great resource for the aspiring club player.&lt;/p&gt;

&lt;p&gt;Being able to manage multiple repertoires for both colours, and collapse what I don't need is a godsend. Unfortunately, like previously with chesscom's and Lichess's tooling, I hit some limitations; specifically, I hit the number of repertoires I'm allowed to keep on Chess Tempo for free. Also, sometimes exporting and importing pgn files were a bit buggy, sometimes I would get empty files, other times my comments wouldn't populate my repertoire on Chess Tempo. Despite these limitations, I still use both Lichess studies and analysis tools -- I even purchased a lifetime supporter badge to show my appreciation -- as well as chess tempo to manage my repertoire's and I use both for tactics training. I only really use chess.com anymore for puzzles and every now and then I'll play some blitz games there as well. I ended up looking into several tools that can be downloaded for offline study.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trying to be the very best:&lt;/strong&gt; Or at the very least, better than I was yesterday. I had quickly found the &lt;em&gt;Golden Standard&lt;/em&gt; program that the top players of chess all use, ChessBase. However, I have yet to take a chance and investing into this software for whatever gains I &lt;em&gt;think&lt;/em&gt; it may provide me. I asked myself what am i really looking for with this type of software. Mainly, I want a program that can allow me to view a game from a pgn file I give it, I want to create pgn files with the program, I would like to keep a database of all games I've played, both online and offline, and I would like to be able to analyze a position with an engine if capable. I pretty much was able to find all that with two applications, ChessX and SCID vs PV.&lt;/p&gt;

&lt;p&gt;I won't dive to deep into these programs, because a review is not meant to be my purpose for this blog series (and I kinda want to move on to the last section of this blog). Suffice to say, they are amazing programs for what they provide and are great tools for an aspiring club player, but they do leave some wants, and do suffer a bit from some un-intuitiveness -- Though the maintainers for each do their very best to minimize this factor (though I can't really tell since I don't have access to the &lt;em&gt;golden standard&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;One of the benefits, and often times curses, of being a software developer/tinkerer/dabbler is that we have the capability to implement -- or try to implement -- our own vision of what we believe a software application should provide to it's user base. So I decided, in my immense wisdom of two semesters of basic cs core classes and that one time I made a game of rock-paper-scissors in java that froze when the random picker function chose paper sometimes, to create my own chess gui. Thankfully, there are plenty of resources and open source projects to reference. Unfortunately, there is a bit of a universal standard today, in which all chess projects follow that makes going against the tide a bit cumbersome and difficult (A bit more on that in the next blog post).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Basic Outline:&lt;/strong&gt; So the main resource I've been using for my chess project is of course the &lt;a href="https://www.chessprogramming.org/Main_Page" rel="noopener noreferrer"&gt;Chess Programming Wiki&lt;/a&gt;. It has many topics, references many other resources and forums, and provides a decent starting out plan and outline for a chess project. Unfortunately (my favorite word), it's main focus has to do with making a chess engine, and some of the more &lt;em&gt;basic&lt;/em&gt; topic details are kinda brushed over in favor of engine specific topics. If you are only interested in making a working game of chess, and not making an engine that can play chess, then the only two topics to focus on are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.chessprogramming.org/Getting_Started" rel="noopener noreferrer"&gt;Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.chessprogramming.org/Board_Representation" rel="noopener noreferrer"&gt;Board Representation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And even then, only one paragraph of the Getting Started section points straight to it's Board Representation section, so really only one topic would be helpful. So I guess another reason for this blog series, is to provide aid to others who may not be shooting for making an engine themselves quite yet, and just want to focus on making a playable game of chess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where are we at the moment:&lt;/strong&gt; To be completely transparent, if you have already somehow read my first post, I am already fairly deep into my chess game project. It virtually works as intended, but I need to create better documentation, as well as project history, for my chess library api (if I am misusing the terminology please forgive me, I am still a college student at the time of this writing). I have already decided on the board representation data structure I am using (it's not bitboards), I have move generation (I may have broken it in the build at the time of this writing), and move validation figured out. My next several blog posts will be my attempt to retrace my steps along my journey, to the current point of my project, starting with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My Board Representation&lt;/li&gt;
&lt;li&gt;Move Generation&lt;/li&gt;
&lt;li&gt;Move Validation&lt;/li&gt;
&lt;li&gt;Perft implementation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After which the blog posts will most likely alternate between the work done on my library api, and my chess gui implementation that uses that library. My next blog post will focus on the board representation and piece representation implementations that I looked into, considered and used.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Start of... Something</title>
      <dc:creator>Arkan</dc:creator>
      <pubDate>Mon, 06 Jan 2025 06:40:16 +0000</pubDate>
      <link>https://dev.to/arkan501/the-start-of-something-ifp</link>
      <guid>https://dev.to/arkan501/the-start-of-something-ifp</guid>
      <description>&lt;p&gt;Hello everyone, the handle I normally go by is arkan501, but you can just call me Arkan. This post marks the start of my dev blogs. What brought me to start a blog, is actually a universal problem that many aspiring software developers appear to face.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I am very bad at creating documentation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You see, a couple years ago I made the tough decision to finally go to college and pursue a degree in Computer Science. The programming projects I have encountered so far don't really require much documentation beyond the inline comments describing what certain function are meant to do, or why I decided to create a function to return 3.14 as pi instead of just creating a constant for it. However, I am a bit of an over achiever...&lt;/p&gt;

&lt;p&gt;I was interested in a career in programming long before covid was on the rise, but never got around to actually investing any serious time into learning anything. If I recall, maybe I learned how to print &lt;code&gt;hello world&lt;/code&gt; to the terminal? Regardless, what I knew at the time was that if you wanted to really show what you were worth, then you needed some projects under your belt. So now that I'm taking the time to invest in this career path, I applied that mentality and began a few small projects here and there. Making projects is important for every programmer, as it's often stressed by many veterans,&lt;/p&gt;

&lt;p&gt;&lt;em&gt;you learn by doing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Another important aspect that goes along with the doing though, is the debugging and &lt;strong&gt;documenting!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git commits, and various comments in my remote repos have served well enough, but eventually it becomes not enough for everything happening with a project. Sure, every micro commit can be fairly well documented, or needs no documentation beyond the title of the commit,&lt;/p&gt;

&lt;p&gt;chore: deleted redundant function&lt;/p&gt;

&lt;p&gt;However, I was quickly finding myself, in my current project, making some tweaks here and there when working on something else (the project is just a chess game library that I can use in other projects).&lt;/p&gt;

&lt;p&gt;It started small, I'd be updating how the pieces move on the chess board, and then I would decide to just change the name of a variable to be a bit more uniform with some naming convention choices I made during this update. Then while fixing a bug that allows the King to teleport to the other side of the board, I need to go into a few other functions because after the bug fix I realized I could make similar tweaks to optimize those functions. Then while finishing up the move generation I had a brilliant idea to use a different board representation that would be far more optimal than the 1D array implementation I am using at the moment. Ohhh, but it broke the Knight's movement and now I need to fix that, but because of my ADHD I decide to put that off and start on implementing generating the board state from a FEN string that I said I wasn't going to do until after I fixed the King teleporting to the other side of the board, that I actually never fixed so I go back for that, and then I have to fix those functions that I though I optimized, but didn't actually optimize because the tweaks made them worse -- I hope you can see what I'm getting at here. I am all over the place, and by the time I get around to committing my changes, I have no clue what I've actually done beyond what I was working on right before making the commit.&lt;/p&gt;

&lt;p&gt;I have been meaning to start some kind of blog, but never got around to it. I would also like to not just create documentation for my programs, but to also document my journey to becoming a software developer. This first blog post may not have a whole lot of bells and whistles beyond that only bold sentence after the first paragraph, but hopefully I get better at formatting my blogs, and making them prettier. For anyone who accompanies me on this journey, I thank you for the company!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
