Sunday, June 11, 2017

Last post on Blogger

This is my last post on this platform.

I am starting blogging again, and my new blog will be focused on Ruby, and specifically web scraping, UI automation and ruby scripts like that.

My new blog will be at www.rubystop.com

Thank you for following me here, and come join me at RubyStop.

Andrei

Monday, April 11, 2016

Productivity hacks for you and me!

Hello, everyone!

I have been working at STAQ for over a month now, and I love it so much! I will make a blog post about my experience of being a brand new dev who switched careers and is self taught around my 2 months anniversary with the company!

Thank you, everyone, who reached out to me through email and Twitter to congratulate and ask questions about my journey! I am always happy to talk, let you know what I learned, and possibly help you switch careers as well! 

With that said, let me share with you some productivity tools that can make you more productive! 

I CAN HAZ PRODUCTIVITY HAX?         
                          
     At the Ruby Uncoference on March 5th that I attended, one of the topics discussed was tools that help increase productivity and automate mundane tasks. I wanted to make a post about tools that I use to increase productivity, and about some tools that I learned about at the conference (some I am already learning how to use, and some are on my list to check out).



                           Task automation is key to productivity :)))) 




                         STUFF I ALREADY USE
  1. Bash Aliases: I recently started using them, and it is addicting. As soon as I notice myself typing something for the 4th time, I am itching to create an alias for it :)
  2. Captured. I have been using Captured for several months now. I find it extremely useful if I need to take a screenshot that will persist on top of all the windows while I use it to compare data or as an example of some text (code) that I am trying to reproduce. It is also pretty handy for sharing screenshots. Be cautious when sharing screenshots that contain sensitive data.
  3. Pocket. I use Pocket when I find an interesting internet page that I don't have to read now (but I definitely want to come back to it later). Just put it in your Pocket! :) You can save the link to the page, and add tags to it, and come back to read it later. It is available on mobile and it syncs all of your saved stuff across all devices.
  4. Magnet. I have been using Magnet for a couple months now and it makes window management much easier. The windows "stick" to corners and having multiple windows open on the same screen is a lot more manageable. Several other apps that do similar things were mentioned at the Ruby Conf: MoomDivvy and Spectacle(open source).
  5. Ack. About the same time, I learned about grep, I learned about ack. It is an easy-to-use grep-like brew add-on. You just give ack a string, and ack will search in your current folder and all sub folders for whatever you are looking for. It also highlights all the matches. :)
  6. Chrome. Chrome is super powerful and helpful to automate every day things. You can set it so it opens all the websites that you need when you launch it. If you log into Chrome with your Google account, you will have access to the same bookmarks across all of your devices. From adding a signature to your email to a plethora of available chrome extensions, Chrome can be a very helpful tool to increase your productivity.
  7. bash-git-prompt. I use bash-git-prompt as a helpful tool that shows information about the current git repo (branch name, difference with remote branch, number of staged files, etc). I also use git-completion.bash file to tab-complete branch names while typing out git commands.
  8. Jumpcut. Jumpcut lets you manage your clipboard, and gives you access to your history of "copy & paste"s.



                Want more?

      
                    SOME MORE POSSIBLY USEFUL STUFF!!!!

    There were a lot of other productivity hacks mentioned at the Ruby conference. Some look very useful and I can't wait to learn how to use them, while some I am not sure I would benefit from. But here is a list of other things that I can remember!!!! :)

  1.  Alfred. Alfred is an application launcher and productivity application. Kind of like your Spotlight but with a lot more features. You can initiate workflows, directly navigate your file system, save text clips, set global hotkeys, access your URL history and much more. There are a lot of user-created extensions for Alfred as well.
  2. SCM_Breeze. SCM Breeze helps you streamline your SCM workflow. It is a set of shell scripts that enhance your interaction with git. It integrates with your shell to give you numbered file shortcuts, a repository index with tab completion and other useful features.
  3. Z. Z (open source) lets you "cd" quickly into your most frecent directories (a combination of recent and frequent).
  4. Boom. Boom gem lets you create, manage and access lists of text snippets right from your command line.
  5. VIM. Yeah, it is on my list. My feelings about VIM can be summed up with "I don't know why, but I must learn VIM". I heard that VIM is awesome, so by learning VIM, I will be awesome. And I am totally planning on learning it by playing me some video games.


    Back to coding, everyone! And be productive!

Thanks for reading, everyone!
All the best,
- Andrei

Thursday, February 25, 2016

I did it :)

  Hello, everyone!

  The biggest news is that I got hired full-time as a Software Developer! I am beyond myself with excitement! My first day is Monday, and I cannot wait. It has been extremely busy two weeks. I have been looking for a new place to stay for me and my wife. We are moving to Baltimore!

  Unfortunately, it means that I had to end my internship early, but everyone there was very supportive and happy for me.

  I will be working for a data integration start-up, and most of my work will be with Ruby! I am really excited about that as well. I love Ruby, and I feel so lucky that I will have an opportunity to really learn the language. I already love all the people at my new job, and the company has a great support and mentorship system in place for jr devs. I can't wait!

  In other news, I was one of the coaches at a Rails Workshop for Women event in Baltimore. It was a really great experience. I met a lot of people, and it was great to coach and teach Rails to newcomers. Great atmosphere and friendly vibes!

  I also have two talks coming up at tech meetups in DC area. I am giving a talk on March 2nd at Arlington Ruby meetup, and another one on May 12th in DCRug.

  There is also a Ruby Unconference I am attending on March 5.

  Such a busy schedule, and lots of changes!

  If anyone is curious about the interview process I had to go through, or you have any questions about me going from a hotel manager to a software developer in 5 months, feel free to reach out to me on Twitter: @andreikoenig. I am always happy to chat!

P.S. I am sorry, I can't share specific parts of the interview process (interview questions, coding quizes, etc), but I am happy to tell you what I did to prepare for the interview, resume tips and general interview tips. :)

  Have a great day, everyone!

 -Andrei

Friday, January 22, 2016

How much can you learn in two weeks?

  Hello, everyone!

  So back in mid December, I got in contact with one of the developers who is a CTO in a start up in Baltimore, and was looking for an intern for their dev team in the company. I thought it was an interesting opportunity, and we made arrangements that I would come in after New Year for an interview. I asked him what they use, and I got back: "rails, postrgres, activerecord, sass, emberjs, sidekiq and elasticsearch". Well, wow. I have spent 5 months learning Ruby. I was aware of what Rails was, and I had no idea what all the other stuff was. So I had two weeks to learn as much as I could. Getting a little bit ahead of myself, in two weeks, I learned sinatra, database basics, postgres, activerecord, sass, spent lots of time getting more comfortable with Rails and git, and familiarized myself with Agile and Scrum model. In the end of two weeks, I launched my own Rails app, that I will be working on as a side project. My Rail's app repo on Github and My Rails app Heroku Link.
I can honestly say, I learned more and saw greater progress in my coding in those two weeks than in the last three months.

  If you would like to give my plan a shot and super boost your progress, here is my study plan:

  Fine print: you need to be solid with Ruby basics, and you need to dedicate a lot of time (or be ok with making slower progress). I recorded my study hours in two weeks. On average I studied about 6 hours a day. (3 hours was the least I ever studied on a single day, with some days studying towards 9 hours a day).

  1.  Introduction and basics of Sinatra (it will make learning Rails sooooo much easier!)

  2. (optional) Behaviour driven development in Ruby (do it if you need a refresher on testing with Rspec, heroku and git). Probably a good idea to at least look through it to make sure everything is familiar. Refer to this week as needed when questions come up.

  3. Object Oriented Ruby . don't spend too much time here, but after working through this week, you must walk away with solid understanding of http methods and how a sinatra app functions. Make your own sinatra app (not following a tutorial) to solidify the new knowledge.
  4. Database Basics. now the fun part starts. If you are not familiar with this, you need to take your time, and get through every chapter. This stuff is very important, and I use this every day, all the time, now that I work with Rails and Postgres. Don't rush this part :)
  5. ActiveRecord. Now that you are a database ninja, this part should feel easier. Again, do not rush this, because these are the ActiveRecord basics that are fundamental to everything you will be doing in Rails later. It will feel easier, as ActiveRecord automates a lot of tasks, that you learned and used to code by hand in the previous week's material.
  6. Rails Basics. Rails, finally! Now comes the part when you finally get to build things. Depending on your experience level with Rails, you can go as fast (or slow) as you need to with this and the next part.
  7. Rails Authentication
  8. Start building your own Rails app! <-- this part is where you will learn most!

   If you have any questions, or need help with your studies, feel free to reach out to me, I am always glad to help! twitter is the best way: @andreikoenig
  
  This is what I did in two weeks (about 18 days). I would have kept going but I ran out of time, and it was time for my interview. My interview went great, and I was offered a paid 3 months long full-time internship at the company. It is an incredible opportunity, and even though I could not leave my full time job for a 3 months internship,  I am doing it 3 days a week while still working my full time job. So yay!

  I have worked there for 3 weeks now, and I love it. I am learning a lot, and I work daily with Ruby, Rails, Javascript and emberJS. I spend Mon-Wed in Baltimore, and Thu-Sun here in Ocean City. 

  Keep at it, and keep putting in time.
  
  I am now absolutely positive that bootcamps are not needed, and teaching yourself code is a viable way to switch careers! :)

  Thanks for reading,

 -Andrei


Wednesday, January 13, 2016

Breaking the silence...

Hello, everyone!

I hope everyone had an awesome holiday season! Happy 2016! Here is to lots of new challenges, lots of new knowledge and lots of changes!!!

I know I have been quiet for a while, but let me assure you stuff has been happening! :)

I will try to cover what I have been doing in the last two months (I might have to break it down into more than one post, or risk it being way to long). Jumping ahead a little, let me tell, I have been coding more than ever!

So right after my last post back in November, I was scheduled to give a talk at a local Ruby meetup. The talk went great, I was a little nervous, but the talk went super smooth. I did a small live demo, where I ran 4 different versions of my code live, and shared a gist to my code to the group. I really enjoyed giving the talk, and I was scheduled for another one in January, which was yesterday. Yep, yesterday, I gave my second talk!

My dog had some major health issues in November, so it took away a lot of focus from coding. And it was one of the biggest reason why I stopped posting in this blog. It was a tough time to get through, and blogging about my coding journey was not very high on my priority list. It took a lot to take care of our sick pup, and my coding dropped down to maybe 5-6 hours a week. I was still working on some projects, but it was a very slow progress. Once she started feeling better, and I recovered emotionally, and from being sleep deprived, I got back to my normal schedule of coding at least 3 hours a day.

The last 4 weeks have been absolutely insane though. I learned more in last 4 weeks than I did in last 4 months probably. I was coding for 5-8 hours a day, and I have covered so much. I wanted to get back to blogging, but I was so focused on the projects I was working on, that I spent pretty much all of my free time studying, hacking away and writing code.

I will talk in my next post about my last 4 weeks, what I have learned, and some amazing things that have been happening in my life :)

I am back, and 2016 is going to be awesome!

Have a great day, everyone, and thanks for reading!

-Andrei

Monday, November 9, 2015

Quick update


  Hello, everyone!

  I have not posted in a week or so, so I wanted to make a blog post with a quick update. I have not done much as far as coding this past week, as my young 2 year old dog has had some major health issues without any warning, so I all my efforts have been focused on taking her to doctors every other day, monitoring her condition and giving her meds every 3 hours. As she gets better, I will be getting back to coding again.

  I am scheduled to give my first talk at a Ruby meetup in Baltimore, MD tomorrow, so I am really excited! ... and nervous. I will be showing a URL checker script that I made. I am so glad that I prepared in advance, and that I had my talk prepared last week. With everything that has been going on with my dog, I would have been struggling to get it ready last minute.


  Thanks for following my blog, and thank you for reading,

 - Andrei

Wednesday, October 28, 2015

Coding for 8 hours straight and staying focused

  Hello, everyone!

  Last Saturday I was supposed to go to a Ruby meetup in DC that was cancelled last minute. So I thought to myself, "well, I was supposed to spend 3 hours driving to DC, spend 2 hours at the meetup, and 3 hours driving home. How about I spend 8 hours on studying instead?".  Well, I did. Should you do it? Do I want to do it again?

  I have a difficult time focusing at home, when I try to sit down and study and/or code. My wife tries to be as mindful as she can when I am buried into my laptop, but with her cooking in the kitchen, my dog barking,  our bird chirping, house chores, TV on in the next room, the laundry buzzer going off, etc etc it is not easy to concentrate.

My dog Zoe especially insists on supervising my studying,
and she wants to make sure that I am aware that she is here for me in case I need anything.
Anything at all!!!!

  Well, I did find another trick that has been working for me. Lately I have been "running away from home" to study. After work, I come home, walk the dog, say hello to the Mrs, and then go study somewhere else for 2-3 hours. My locations of choice are coffee shops with good wifi. I get me a cup of coffee, put on my headphones and study. Zero distractions. :)

  So last Saturday, I went to my local Panera Bread in the morning and spent 8 hours studying. I had breakfast and lunch there. I was pretty tired but it was productive 8 hours. I did Chapters 47 and 48 of "Learn Ruby the Hard Way", Chapters 11 and 12 of Chris Pine's "Learn to Program" and worked a little on a couple of scripts I am writing as side projects. It felt really good to knock those chapters of my to-do list, and move forward.

  I mentioned it before in my blog, but when I code for more than 2 hours, the Pomodoro Technique is what really helps me stay focused. Basically, I study for 25 minutes until the timer goes off, and then I have a 5 minute break (where I do something totally unrelated to give my mind some rest: browse Facebook, check my text messages, watch a cat video on youtube...). Once 5 minutes are up, it is back to laser-focused studying for next 25 minutes without any distractions. It really helps me out, and I don't get burned out or tired. It has really changed the way I study.

  So, coding for 8 hours straight... Do I want to do it again? Heck, yes. I loved getting so much stuff done in one day, and seeing so much progress. I am looking forward to when I can schedule another power study day!

  Should you do it? That is something that you might have to decide for yourself, but it sure is a great way to get some of your projects done that have been on your back burner.

  Last piece of advice in case you do. Make sure you do a nice physical activity to get your heart rate up after you spend 8 hours staring into your laptop (go for a walk, for a jog, for a bike ride). What a satisfying way to end a super productive day!

 Have a great day, everyone, and thanks for reading!

 -Andrei
  

Thursday, October 22, 2015

Kicking studying into high gear

  Hello, everyone!

  This is a pretty exciting time for me. I live in a seasonal town, and starting Monday, it will slow down a lot for me as far as work goes, so I should have a lot more free time. I am planning on kicking up my study hours up a notch. I will try to aim for 5 hours a day. We will see how that goes.

  My Rails study group seems very promising. We already had one Google Hangout where we all "officially" introduced ourselves to each other, and talked about our plans for this study group. We will try to do one chapter a week, and talk about it on Mondays. There are exercises in the end of the chapter, and each person has been assigned an exercise that he will present to the group, and talk through solving it.

  I have been attending Ruby meetups as well. I am going to another one on Saturday in DC, and I am even scheduled to give a talk in an upcoming Ruby meetup in Baltimore, MD on November 10th! That's right, I volunteered to give a talk. I have never given one before, so I am really nervous and excited. I still have some time to prepare. My talk will be geared towards beginners (obviously). I think it would be a great experience and I will learn a lot from it too. I have to have a solid understanding of everything I will be attempting to present, organize my thoughts, and reword the material in an easy to understand manner, plus also hopefully be able to answer questions.

  I also purchased "The Well-Grounded Rubyist" By D. Black. It has really good reviews, and I am looking forward to reading it to supplement my learning.

  Still working on "Learn Ruby the Hard Way",  I really want to finish it but it is going pretty slow. I am stuck on the chapter that teaches you about writing test scripts, and I am having difficulty making tests for my own programs. I need to spend more time on it...

  That is all for now,

  Have a great weekend, everyone!

 - Andrei

  

Sunday, October 11, 2015

Two months coding journey summary

  Hello, everyone!

  Another week is coming to an end, and today is my two months "anniversary" of learning code.  Happy code-a-versary to me! :) Not that it means that much, but I feel like I have made considerable progress in 60 days. Sixty days ago, I learned how to code my first puts 'Hello, world!' program.  And today I wrote a script that reads a .txt file that contains a list of URLs, sends a request to each one, and emails the results of all the URL checks. (I will be talking about that script later in my blog).

  Here is a blueprint of how I studied with the resources I used. It might prove useful for those starting to learn code.

  In the last two months I have:

 - installed brew, ruby, rails, git on my computer (Link)
 - learned the basics of command line (Learn Command Line the Hard Way)
 - learned the basics of Git (Codeschool)
 - learned the basics of HTML and CSS (Learn How to Program)
 - some more HTML and CSS basics (General Assembly Course)
 - completed first 10 chapters of C.Pine's "Learn to Program" (e-Book or you can buy it on Amazon)
 - completed first 45 Chapters of Z.Shaw's "Learn Ruby the Hard Way" (e-Book)
 - started Hartls Rails Tutorial (Rails Tutorial)

 Whew, it has been a busy two months! And a lot more studying ahead! :)


 Here are some tips that I can offer to anyone who is learning code:

  - Avoid jumping around between websites and resources. Especially if you are a beginner, most resources are mostly the same. Just choose one, whatever it might be, and stick with it. It will give you direction and purpose. Googling "best online coding course for beginners", jumping from one resource to another, and looking for that perfect tutorial is a waste of time. You could have just done another chapter! :)

-  Learn to read documentation. Yes, it is a giant pain, it is very confusing, and I am absolutely terrible at it. But documentation is the absolutely first place I look. Googling and looking through stackoverflow is my last resource. The more I work with documentation, the faster I find answers, the easier it is for me to understand what I am looking at, and how to apply what I see.

 - It is not easy to say, but I am a pretty lazy person by nature. It helps to find a system that keeps you focused and engaged. For me, I discovered a Pomodoro Technique. You can follow the link to learn about it, if you have never heard of it, but in a nutshell you study in 25 minute bursts, and then break for 5 minutes. It really works for me, and it completely changed the way I study. I don't get distracted, I am very focused and very productive. You don't have to use the Pomodoro Technique, but finding a system that works for you will increase your productivity.

- Set small daily and weekly goals. It gives purpose, and makes you excited to sit down and work on stuff. For example, my weekly goal might be "Complete Chapter X". But the goal for the day might be "Finish specific script or part of the script that I am working on" or "Learn about a specific topic".

- Get involved. Codenewbie.org is an amazing resource for those who are learning code. Getting involved, participating on the forum and in their twitter chat will accelerate your learning and will give you needed encouragement when you might be struggling. Find local Meetups in your area, and go to them. You WILL learn faster, and you might find a coding buddy, a mentor, and maybe even a future employer. Oh, and if you don't have it yet, get a twitter account ;)

- Don't code or study when tired. You will not retain information well, it is difficult to focus, and it is a waste of time. Just go to bed, get some sleep, and start fresh in the morning.

- Code. Every. Day! It really helps to get settled into a habit, and it also means that every day you are making progress!

 My plans for the next week are:

 I am attending a Ruby meetup in Baltimore on Tuesday, so I am really looking forward to that. I plan on finishing Chapters 46 and 47 of Learn Ruby the Hard Way, and finish Chapter 2 of Hartl's Rail's Tutorial.

That is all for now,

I hope you found this post useful, and as always, thank you very much for reading!

Keep Calm And Code On,

- Andrei




Friday, October 9, 2015

Rails Hartl Tutorial and end of the week update

  Hello, everyone!

  Another week is almost over, and in two days I will have already been "learning code" for two months. Time flies when you are having fun, I guess :)

  Me and two other #codenewbie slack members (twitter handles: @Jonai_Live and @RandyTorres23) started a small study group, and we will be going through Hartl Rails Tutorial together. We are planning on doing a weekly Hangout on Sundays to discuss the week's material, help each other through issues, and decide on the goal for the following week. Chapter 1 is the goal this week. It is a short chapter that mostly deals with setup. It has you setup rails, git and heroku. As an assignment for the chapter, a small rails app is developed and launched live to the web using heroku. Here is mine (don't get excited, it is not much at all): Chapter 1 app .   I am done with Chapter 1, and looking forward to the Sunday Hangout.

  In other plans, I am attending two more Ruby meetups: one tomorrow in Washington DC (the same one I went to two weeks ago), and one in Baltimore on Tuesday. I will definitely let you know how that goes.

  I am still working on Zed Shaw's "Learn Ruby the Hard Way", even though it has been kind of an a back burner this week. The goal is to finish the book completely along side with couple of other things I am working on.

  This week I have started on working on a script of my own as a side project. Not much to say right now, I am still trying to narrow down what I want it to do (and how). As this project develops, I will be covering it more in this blog.

  In the next blog post, I will attempt to do a summary of my two months learning code, with some tips for anyone who is about to (or thinking about) starting this journey :)

  That is all for now!

  I will talk to all of you cool people later,

  -Andrei

 PS. On an unrelated note, I had a chance to see "Martian" yesterday. What an awesome movie! Definitely recommend! :)




  

Tuesday, October 6, 2015

Codenewbie.org and Ruby Monday

  Hello, everyone!

  I have been a lurker in the codenewbie community for about a month now. It is a very active community designed to help new developers. They have an active forum, webpage with lots of articles. They host a weekly twitter chat for beginners etc.

  They also have a Ruby Monday event where they host a Google Hangout and collaborate on a project. I joined them last night to listen in. I must say pretty much everything just went above my head. I understood on the high level what was discussed, but I did not understand specific code. But it was still a good experience, and I am glad I participated. Listening for two hours to several people discussing code exposed me some more to the process of team coding, jargon and code logic.

  I also met a couple of other new developers, and we are thinking about forming a study group, and work through a tutorial or a specific book together.

  I highly recommend checking out and participating in the codenewbie community if you are a new developer.

  - Andrei

Sunday, October 4, 2015

Shopping made easy (Ruby Edition)

  Hello, everyone!

  Chapter 45 assignment is done. My game is ready, and the code is 100% complete. I have to finish writing out flavor text, and I will do it in my spare time over next couple of days.

  The only thing I had left to do today was finish code for the shop where Hero can spend gold to buy gear, and man, that proved to be the most difficult part of the game! I never expected it. I thought coding the combat sequence was tough.

  So the idea behind the shop, that it will have items for sale where the Hero can spend gold to buy items that will boost his stats. (like a better shield will increase Armor, better sword would increase Attack, etc). I had the following items that I wanted to have available in the shop.
  1. Magic Hammer: increases Attack Range for the Hero (8 gold)
  2. Magic Sword: Increases Attack Range, Hit Chance and Crit Chance (10 gold): slight boost to many stats
  3. Magic Shield: Increases Armor Class (7 gold)
  4. Magic Boots: Increases Hit Chance  (5 gold)
  5. Magic Ring: Increases Crit Chance (5 gold)"
  6. Health Potions: Increases Health Potion Count by 1 (1 gold) - no stat boost, but increases gives 1 more potion.

At first I had it written out in a hash with the name and cost:




  That works fine for asking what item you want to buy, and deducting the cost from the total hero's gold. But the problem was that I had to increase the appropriate stats depending on what item was purchased. I could do it with a bunch of "if .. else" blocks, but that is so ugly, plus what if I had 1000 items that hero could choose from?

  I finally realized that the values for the keys in my hash could be ARRAYS! So I needed a new array that would take starting values of all the stats of the hero. I called it @stats. The array in the key value pair in the @shop hash will hold the modifiers for those stats plus an extra element that would hold a string with the name of the item. When an item is purchased, the elements in the same index of both arrays are added together to get updated stats for the Hero. I had to write a method that would "add" elements of both arrays together, which I called "upgrade".

The only other thing I had to do was, change the gold cost value to negative, so it subtracts.










  Once I got over that hurdle, it was a lot easier to finish out this code. I had to add a check before every single purchase to verify that the Hero can afford the item he/she is requesting, with a message if the item is too expensive.

  I also had to make a separate code for purchasing a potion, because all it would do is increase the number of potions the Hero has by 1.

  Final thing is to update all the Hero Stats to values of elements in the @stats array after the shopping is done.

Final code for the Shop looks like this: 



You can see the full code on Github if you prefer it that way here.

 This was a fun challenge to overcome for me, and I feel like I learned a lot. Trying to complicate the game just created additional puzzles that I had to figure out.

  I will start Chapter 46 in Zed Shaw's "Learn Ruby the Hard Way" tomorrow!

  Thanks for reading!

 - Andrei




Saturday, October 3, 2015

Chapter 45

  Hello, everyone!

  Just a quick update here,

  Still working away on Zed Shaw's "Learn Ruby the Hard Way" Chapter 45. In this Chapter, the goal is to make a game using classes and modules. Mr Shaw encourages to make this game as complex as you can, and I am really taking it to heart. I gave myself about a week to work on it, and today is Day 8, so I am running a little behind my schedule, but the good news is that the actual code is mostly done. I was going to just go to the next Chapter, but my wife now wants to play the game I made, so I will spend a little bit of time to fill out the "flavor text" in the game, and balance it to make it easier to win.

  At first, I was going to make a simple dungeon crawl game, where you go through the dungeon, fighting monsters until you get to the boss in the end, who you have to defeat to win. It started out simple, where the hero and monster would just have a couple stats (such as HP, Attack Strength Range, and Armor Class).

  Now, after a week of going over the code and adding new features, the Hero of the game will have the following stats:
  - HP: total hit points
  - AC: Armor Class (the monster has to roll higher than AC on a 20sided die to not get blocked)
  - Attack_Range:  the range for the damage Hero deals on a successful hit, will be improved with better weapons and/or spells
  - Crit_Chance: a chance that the damage that the Hero deals will be doubled
 - Hit_Chance: a modifier that will help the Hero to avoid being blocked by a monster
 - Wisdom: this will improve the strength of the Hero's Spells and will help detect traps
 - Gold: as Hero defeats monsters, he also collects gold that can be spent on better gear and health potions.

  Hero can cast spells during combat that will do damage, or increase his stats for the duration of the combat. Hero can also find a bow during the game, and will be able to deal ranged damage before actual combat begins.

  Also when the game starts, a player has to choose a specialization for a Hero: Strength, Dexterity or Wisdom. Depending on the Choice, certain stats will be increased for the newly created Hero.
For example, Strength will increase HP, AC and Attack Strength.

  This is what my Hero Class looks like now:




Passing 6 parameters in a little much, but I figured that I am only creating one instance of this class, so it might be ok in this case.







Here is what my Monster Class looks like:


Many instances of the class Monster will be created during the game, so there are only two parameters, with the second one being a hash "options", that will hold all of the monsters stats. If the hash does not contain a specific stat, the default values for the stat will be used.






All in all, I am pretty excited to get this game finished, and move to the next Chapters. Tomorrow, my goal is to have all the code 100% complete and working, so that I can start next Chapter. I might have some flavor text left to fill out, and work on fight balancing, but I can do that in my spare time from coding.

Have a great day everyone, and thanks for reading my blog!

-Andrei

Wednesday, September 30, 2015

Fastest Way to Learn Ruby

  Hello, everyone!

  I have been spending a lot of time coding these last couple of days, so I am pretty happy about that.

  Last Saturday, I drove up to Washington DC for a Ruby Meetup group, that meets every other Saturday for "what they call" a hack-a-thon. It was my first time participating in a meetup group, so I was not sure what to expect. I had a very positive experience. This particular meetup was basically an open lab session. Everyone came with their laptops and worked on their projects for 4 hours or so. It was great for a lot of reasons. I was there for 4 hours, so for 4 hours I pretty much was writing code. It is difficult to do that at home, because there are always distractions, and it is almost impossible to find a 4 hour block of time to just sit down and code. It was also great, because when I was stuck, there were several people who were very knowledgeable at Ruby sitting next to me, willing to dig into my code and help me out with it. I was working on my game for Chapter 45, and the host of the meetup spent about two hours with me, going though my code, giving me ideas, showing me how I can optimize my code, explaining a lot of new concepts to me on the way. I also asked questions about the previous chapter on hashes that I had difficulty with, and he explained some parts of the code that I had trouble with.

  I can honestly say that in two hours with him, I learned more than I do in a week of self-studying! It was incredible. I picked up a lot of little tips on how to work with irb, understood some important concepts that I was struggling with, etc. It was definitely worth the drive to DC, and I am looking forward to going there again, and going to other Ruby meetup groups in the area.

  If you are out there, trying to teach yourself code, look up local meetups that you can go to in your area. It might accelerate your learning and you might meet some interesting people.

  It is starting to slow down at work for me, as winter is approaching, so my plan is to double my study hours by November 1.

  I can't wait to finish Zed Shaw's book, and see what I can dive into next!

  The goal is to have Chapter 45 complete by this weekend!

  Thanks for reading, and til next time.

 -Andrei

Friday, September 25, 2015

Back to blogging

  Heeeello, everyone!

  It has been a couple of weeks since my last post. I have been somewhat busier than usual at work, but I am back to normal now. I am planning on posting consistently again. Realistically, it does not take long to make a blog post, but I have not been coding as much, and it felt like I did not have much to share.

  Anyway, in the last weeks, I did work through Chapters 39 to 44 of Shaw's "Learn Ruby the Hard Way".

  Chapters 38 through 40 covered hashes, classes and modules, and Chapter 41 introduced the concept of "object oriented programming".

  I must say Chapter 41 had me really stuck, considering that I was just blowing though the material previously. When I was trying to wrap my head around the exercise code, it really felt like I accidentally skipped a couple chapters. This is  --> the code <-- I am having difficulty with. I understand what it does, I just don't 100% understand HOW it does it. You can see my #comments in the code where I am having difficulty. What I ended up doing is just submitting to the idea that I do not understand it all the way, and moving to the next chapter. I will give it some time, work through some more material, and come back to this equipped with more knowledge to hopefully understand it better.

  Chapter 42 reinforced the differences between classes, subclasses and objects. After the brutality of the previous chapter, the code seemed very easy, and I think I understood it pretty well.

  Chapter 43 was fairly difficult but really cool. Mr Shaw goes through a process of analyzing and designing "object oriented" code, which basically has you building code from "top to bottom". He walks through his thought process of building code from scratch from an idea to the final code.

  Chapter 44 describes the difference between class inheritance and composition, and briefly touches on when one is preferred over the other.

  Chapter 45 is all about building another game, and that is what I am working on right now.  I have the game designed already, and I am writing small snippets of code, and testing everything to make sure it works how I want it to, before I start building the actual game code. It will be a small dungeon-crawl style game, where you fight monsters, improve your character to face the boss in the end of the game. There are some things I want the game to do, that I have NO idea how to do it in code, so I am planning on learning a lot during this project!

  This post has gotten a little too long since I have last two weeks of "not posting" to catch up on. Thanks for following my blog, and thanks for reading!

  I have some exciting things planned this weekend, so I will talk about that in my next blog in a couple of days, and I will talk through some code examples that I am working on for the game I am working on.

  Have a great weekend, everyone!

 - Andrei
 

  

Monday, September 7, 2015

Play my Ruby game!

  Hello, everyone!

  Still coding here, and I just finished Chapter 36 of Mr. Shaw's book. The Chapter's assignment is to make your own text based game. I found the website where I can upload Ruby code, and you can play my game right in your web browser! I would love for you to play my game and try to beat it! It is a pretty simple "escape room" style game. It took my wife less than 5 minutes to win! :)

  Click Here To Play my game! When the window finishes loading, Click "Run" on the top right corner to execute the code. Also it is a lot easier if you resize the window so you can see less code and more of the game window. Drag and drop the divider in the middle to the left, so that your black screen is wider. Just read the text on the right, type in your commands and enjoy the adventure  :)

  Let me know if you liked it, or hated it! Or if you run into errors, or you are stuck :)

  It was pretty exciting to finish this large chunk of code, and to have it all work! I had a lot of fun coding this game.

  Here is the raw version of the code on github: https://gist.github.com/e3a8244e1206ee455dd8

  This repl.it website is pretty neat. You can code right in your web browser, and run the script. Pretty handy if you are a beginner!

  Later!

  -Andrei

  

Wednesday, September 2, 2015

Time to sort it all out...

  Hello, everyone!

  For the last couple of days I have not been able to get as much as studying done as I hoped, but I am done with first 10 chapters of Chris Pine's book. The chapter 10 exercise was the most challenging so far. I needed to write a script that asks the user for any number of words, gives all those words back in alphabetical order, preserving capitalization and keeping all the duplicates, and then shuffles all the words and gives them back in random order. The challenge of the exercise is that you cannot use any built in methods for it (like .sort). So I had to write the sorting script myself.

  The biggest challenge to me is to "solve" the exercise in English first, to figure out "how" I want the code to work. After I have an idea of how the code "should" work, writing it down in Ruby is just a matter of getting through all the error messages :)

  Here is how I solved it: Sorting Challenge

  I started working through Zed Shaw's Learn Ruby the Hard Way book, and I am up to chapter 15. The first 10 chapters were easy, but it is picking up difficulty fast.

  That's all for now!

-Andrei

Saturday, August 29, 2015

When in Rome ...

- What roman numeral can climb the fence?
-IV.

  
Hello, everyone!

  I have been working my way through Chris Pine's book, and I am done with Chapter 9. The two challenges that I have been working on the last couple days are programs that would convert the modern number into a roman numerals.

 The first one was a little bit more straightforward. It would convert the number into ancient roman numeral. So a 9 would be turned into a VIIII. It is just straightforward addition, from larger to smaller. This is the code I wrote: Ancient Roman Numerals Challenge.

  The second challenge was to rewrite the code so that it converts the number into a modern roman numeral, in which in order to avoid repeating a symbol 4 times (like IIII in VIIII), you are supposed to subtract from the higher number. So a 9 would be IX. At first I thought it would be just a minor tweak to the code, and I really struggled to make it work. I had to redo pretty much the entire code from scratch. This is the final version of that program: Modern Roman Numeral Challenge

  As as a beginner, you can really get hung up on the smallest things. After I finished the above challenge, part of the code would not behave properly for some reason. It took me about an hour to realize that
     x = 2
     if x == (1 || 2 || 3)
     puts 'x is equal 1 or 2 or 3'
     end

is not the same as

  x = 2
  if (x == 1) || (x == 2) || (x == 3)
   puts 'x is equal 1 or 2 or 3'
  end

  As soon as I changed my code, everything worked. I understand the difference now, but at first to me both of the codes above were the same thing.

  I started Chapter 10, and I am trying to wrap my head around recursions, which is going a lot slower than I hoped, I must say...

  Thanks for tuning in,
  til next time,

 -Andrei


Tuesday, August 25, 2015

So excited by Ruby!

  Hello, everyone!

  I finally started to learn the basics of Ruby, and I am already on Chapter 9 of Chris Pine's book Learn to Program! I am having so much fun! I know, I know, it is all very basic stuff to some of you, but I feel like I can actually create things. It has not been too difficult so far, but I am sure the tough stuff is coming ahead!

  One of my biggest "accomplishments" so far is the code that prints out the entire lyrics of "99 bottles of beer".  https://gist.github.com/anonymous/6b690a557bd0a6dab601 I am sure there is a more elegant way to code it, but I was super happy when it finally worked :)

  I also did a program that lists all the leap years within any range that you input.

  Also, just today, I learned about irb. This must be how superheroes feel! This really is like a super power! :) So many questions that I have been struggling with for the last couple of days can be answered just by using irb. Simply amazing! If you are out there, beginning to learn Ruby, learn about irb asap. What does this command return? nil? Integer? String? irb has an answer.

  My wife is arriving home from Ukraine tomorrow, so I will not have any studying time. I will go to the airport after work to pick her up, and spend the evening with her. It will be great to see her! It feels like it has been a lot longer than a week that she has been gone!

  And back to the Ruby grind on Thursday! Chapter 9 awaits: Writing Your Own Methods!

 Have a great day, everyone,

 -Andrei

 

  

Saturday, August 22, 2015

CSS and Robots

   Hello, everyone,

   I feel I am making good progress so far. I finished Epicodus and General Assembly html and css introductory courses. They teach same subjects but very differently. I finally feel I am understanding positioning a little bit better after making an animated robot entirely out of html and css. Pretty cool! I tried pasting the entire code here in blogger, but it does not seem to play well with javascript. (so here is just a picture of the little guy :))) I highly recommend both courses. They are both very well done! :)

  I ordered Chris Pine's book Learn To Program and should be receiving it early next week. I am excited to finally start learning Ruby. I will try to work through that book as far as I can, I hope it is beginner friendly. :) I will start working through it tomorrow using the free online material at https://pine.fm/LearnToProgram/ until I receive the second edition book in the mail.

  Have a great weekend everyone,

  Thank you for the feedback, and thank you for following my blog

  -Andrei