Today I Learned #2

Well… Admit I didn’t get much done in my free time today, played Civ V instead.

Also started playing Bravely Default, just got to the second boss.  The system is nice but this boss is really annoying.  Status effects everywhere, and the fact that the boss can store and release multiple heavy AoE attacks in a row was not a fun realization.  It’s mildly interesting so far, I’ll see where it goes.

Learned about C# Reflection, man that was nice.  Weird I didn’t feel the need to use it until now, used it with an ASP.Net web forms project.  So you have a form, it’s got a bunch of controls, and you’ve got to save/update a database row with a large number of columns.  Each form submission updates one of these rows.  It gets really tedious binding each data column to each control manually.

C# reflection comes in where you dynamically get a list of properties (and as I learned soon after, fields), give your controls IDs that can be matched up to the DB column names, and then loop through and populate the form / gather fields from the form.  It sure makes things a lot neater than having line upon line of individual form/data binding.


Today I Learned: #1

Let’s start with a series!

Today I learned about the space between inline divs.  Quite the ‘how did I not know that’ moment.

So if you have two divs, they’ve both got a style display: inline-block, then it’s possible they’ll be displaying with some space between them.  I spent at least 5 minutes adjusting margins and paddings repeatedly before googling it.  There’s space between the divs… because there’s space between the tags.

If you put no space between the first div’s end tag and the second div’s start tag, they’ll appear right next to each other, ie.

<div>
text
</div><div>
text2
</div>
You can also comment out the space between the divs.

Also, Herald of Autumn is out, released a couple days ago
https://play.google.com/store/apps/details?id=com.westernarc.heraldofautumn

Herald of Autumn - screenshot thumbnail

Took 6 months, can you imagine?

I’ve started a new project, it’s to be a 2D artillery-type turn based game.   Just created the project in TFS, the prompt gave me a small chuckle.  Team will love it? I’ll be the judge of that.

dev-20150630