Gmail error #007

Gmail became a little upset with me recently, and has been… awkward with whether it sends my emails or not.  After much faffing with my connection, and clearing caches and network configs all over the place, I discovered this was because of avast.

 

Go into the settings, components, mail shield, and turn off the “insert note into clean message” setting.  It should now work fine.

Minecraft for Adults

Minecrack.  It’s a game I’ve very much enjoyed since I started playing it back in the dark ages near the beginning, and I have whiled away hours wandering through caves and building massive structures on my own.  After a while, playing with friends was the name of the game.  Massive multiplayer servers where we would build huge structures – sometimes alone, and sometimes with help – but the drive was there to show everyone your masterpieces and share in their ability.  Then came the time when redstone was king – the last mystery to be explored and new projects created.  Mods dive more and more into the complex or the pretty – allowing structures closer to Steve’s scale and machines of ever more intricate nature.

Vanilla Minecraft survival has a few distinct sections of play when you start a new world.  The first is to survive the night and set yourself up with some basic tools.  The next tends to be spelunking for materials to get yourself a pile of decent tools.  Then you can start what passes for the industrial age, and strip mine in comfort and safety to gain all the resources you’ll ever need for your nextBigbuild(tm), and start building more and more advanced structures.

I’ve always really enjoyed the first steps in Minecraft.  Moving from having nothing to having a pile of awesome tools and armour is a really satisfying feeling.  Exploring the world and finding materials (and a nice view/site for a specific structure) is likewise very enjoyable for me – so I have found it a shame that the modding community tends to focus on the end game sections.  Better top end equipment, better/more complex machinery. More block shapes, sizes, colours, lighting, furniture…  They don’t change anything, just add something.

Recently I have found a mod/modpack called TerraFirmaCraft.  The idea is that Minecraft is too easy, and too removed from reality.  I don’t know about either of those statements, but what the mod does is extend those sections of Minecraft that I love.  Crafting very simple tools is a little more complex than in Vanilla (you must shape stone before attaching it to a stick).  Crafting the first tier of metal tools is much more complex (pouring the metal into a mold once its hot from a kiln).  Sources of metals are spread much much further apart, and only occur in their native bedrock.  Biomes now have different types of rock, and different layers.  Dirt and cobblestone obey gravity (like sand and gravel), but that gravity can pull blocks sideways too.  Mining through rock can cause cave ins.  You now fall through leaf blocks (and thatch).  Building a first home is no longer a first night must, because it’s not necessarily possible on the first night.

There are a lot of differences in the pack compared to vanilla, and it is strikingly different to see and to play.  There are, however, some downsides.  Vanilla is very easy to pick up.  Where to go next is easy if you have the wiki to hand for the crafting recipes, and even easier with a friend.  TerraFirmaCraft is not.  The different tiers of tools are crafted very differently.  Forging items is subtly different even between worlds.  There is a wiki, but it is less than fantastic.  It’s usually out of date, difficult to find what you want to know, and missing a lot of information which you will want to know.  The mod author has been very vocal in stating that they do not want to mod to turn into a numbers game where people find the most efficient and broken combinations – and this is somewhat admirable.  But because of this, there is only one author on the wiki, and the forum devoted to the modpack is policed heavily for this information.

I am loving my time in this more difficult, dangerous, and unpredictable world.  I love the forced need to explore.  The extra tiers of tools.  The extension of the game that I love.  But I do wish that people thought more about accessibility.  Complex should not mean inaccessible.

Tagged ,

Emoticons: Gmail vs Outlook

A few times recently, I’ve seen a few J’s peppering my emails (I use Gmail) and have wondered why they were there. Only from certain people, and only in places appropriate for punctuation.

I have discovered the answer. Outlook uses Word for its text editor, and in this piece of software, : ) and : – ) are automatically converted to an emoticon. In Word, the wingdings font is used for those icons – rather than the standard. Gmail (and other readers also) do not have wingdings installed, so just revert to a different font, thus showing J instead of the wingding smiley face.

Mystery solved, and now I know what the J’s mean. I don’t think I can be bothered to fix this issue (even if I could install wingdings for Gmail…)

TOGAF: Foundation

I’ve finally had a PDP at work. It’s taken nearly 3 years, but training (self-training, but training none the less) has finally been provisioned, and for my sins I’ve started on TOGAF before I move to more technology specific stuff. TOGAF stands for “The Open Group Architecture Framework”, and is a framework for planning, implementing and using Enterprise Architecture. I’m led to believe it’s an ITIL analogue, and that it is a useful thing in the IT service industry.

TOGAF comes in three parts, the foundation, certification, and the resources to support the application of TOGAF, and whoever decided to separate the framework in this way for teaching also clearly decided to separate the chapters in the study guide. Idea’s are introduced so slowly that they are hardly introduced at all, and a whole chapter is dedicated to defining terminology including “view”, “viewpoint” and “information”. The guide needs a serious restructuring, and some much better writing. The dry, buzzword bingo effect is mind numbing – I can’t sit through more than 10 pages at a time (usually a lot less).

One third of the way into the foundation however, and I can see that the system does have advantages. It is a structured way to produce a lot of useful documentation, and to encourage the use of governable processes. I am concerned that the ideas hinted at in the foundation aren’t going to be fully described until the certification level, but it is a great way to teach me how to speak in buzzwords to management, so I suppose all is not lost…

Boredom Strikes Again

Well, apparently I haven’t been bored since last summer. Maybe this is because my other half’s blog was finished, so I didn’t need to understand WordPress any better. Maybe it’s because I had plenty of computer games to play. Maybe it’s because my other half stopped updating her blog/website too – so I didn’t feel the need to compete. Maybe it’s because I haven’t done anything worth mentioning. Whatever the case – I stopped.

I may start again, I may not. I’m not sure. Maybe I’ll just be erratic with my posts (as they are to myself as much as anyone else) and not worry about it. I guess there is no way to tell other than to do it and see what happens.

I also notice that the formatting of my photo’s on my previous posts has gone awry. I seriously doubt I’ll fix them – but i might post the code required and what WordPress broke next time I post some photo’s.

Anyway. I’m bored right now, so maybe I’ll post some more in the coming weeks. Just a heads up.

Dune

First post in a while, let’s make it a long arduous journey shall we?

Just about a year ago, I went to a board games day with a few friends, and played Dune, a fantastic game themed around Frank Herbert’s Dune. Set on the northern hemisphere of the planet Arrakis (otherwise known as Dune), the game is a bluffing wargame, with no dice involved. (Well, that’s a lie, there is one dice, for how far the storm moves each turn, but its a known quantity each time.) As such, my other half loved it (as did I) and I wondered about procuring a copy. Unfortunately, its out of print. No matter, up steps the man of the moment, who’s seen some pictures on Board Game Geek of a beautiful wooden board…

I went out and, full of enthusiasm, bought various materials including some marble chips for army pieces, some glass “optics” for spice (money) counters, and some dye to make my board look sandy (with pine dye) and rocky (with walnut dye/van dyke crystals). Then I promptly did nothing, with the garage being full of car, and it was turning rather cold anyway…

Now that summer has re-appeared (and as my other half decided to take a trip to see a friend elsewhere in the country) I gained some workspace for a couple of days, and made a proper start. I started by printing out an 18″ copy of the original board, and tracing over it onto some grease proof paper. Cutting the sections out gave me some templates for the pieces I’d be cutting. I traced around these onto some sections of sanded 6mm ply, and cut them out on my dad’s bandsaw thoughtfully lent to me for more or less this purpose.

IMAG0152
The paper board, printed, cut out, and sellotaped
IMAG0150
The paper board, covered in slightly bendy templates

The “sand” areas of the board are on one level, and the “rock” areas are a little proud, with the “polar sink” higher again. I decided this gave the board a little more life, and meant I could get away with a lot more bad cutting. I peeled the bottom layer of ply away from the edges of the rock areas with a combination of my scalpel, and some modelling chisels. I’ve also decided to do the “city” areas in brass, to stand out well against the rest of the board.

IMAG0134
My chisels and knife
IMAG0133
A rock area
IMAG0132
The Pole

I started cutting more than one of each section, thinking I’d pick the best of each, but soon gave up and just tailored each piece to fit as needed. I also started with the grease proof templates, but occasionally needed to create bespoke templates to match the already cut prices. I’ve also adapted the original board a little, to make it a little easier to place army chips (though the topography of the areas is still intact).

IMAG0138
putting the paper under the already cut areas…
IMAG0139
I traced the edges to give this…
IMAG0140
Cut and test fitted!
IMAG0148
All dry fitted together
IMAG0147
And again…
IMAG0149
Detail shot of the centre

Now that I’m a little way into the project, it’s obvious to me that my cutting leaves a lot to be desired, so I want to inlay the gaps with brass. I need to do a few tests before I’ll be happy with how I’ll be doing this. I also know that my chiseling skills need work. I ran one of them up my thumb, and now can’t really do much to the project till its healed. I won’t burden you with pictures of that. On the plus side, I know my chisel’s sharp!

Tagged

More Chess

I’ve played a good few games with the guys from work now, and enough people in the office have started joining us that we are thinking about a mini-tournament. I’ve lost less than I thought I would, but still more than I’d like. Especially recently.

I got into an odd situation a couple of days ago, where I was down to just my king, and my opponent had a knight, a bishop, and his king. I wasn’t sure if you could force a mate with those pieces (I could think of several positions where a mate could exist, but not how to push your opponent into those positions). It turns out there is, and my opponent looked it up – Deletang’s Triangle method (first published in 1923 by Deletang). However, it is a little fiddley on the cusp of moving from the first to the second stage, and again on the second to third. My opponent made an error (moving his king too close to his other pieces, blocking the bishop) and allowed me to escape. I was never going to do anything but lose this game, so I declared a draw via the Fifty Move Rule as soon as I could. If you do use this method, be aware that it takes 30 or so moves, so you should make sure you always make the right move to avoid the draw!

The fifty move rule is one of three methods of drawing in chess and probably the least known. It confused my opponent nicely. The other two methods (if you don’t know them) are simply agreeing to draw, or declaring a draw via Three Fold Repetition.

Clever Divs

The internet is a fantastic place, full of some very clever individuals who do some incredible things. Turning a div into a link is easy to do wrong. Its very easy for the HTML within the div to appear as text and not a link, or to have your link shifted to one side, or to have another link inside the div not to work at all…

After a little googling I discovered a very elegant solution on stack overflow. The gist of this is to create a link somewhere in your div with only an empty set of span tags within. You then use CSS to make this span cover the whole div. Essentially you are drawing a link over the top of your div. Excellent.

Whats really nice about this method is that you can do anything in the div that you could usually do with HTML rather than needing specific images or editing software. You can also overlay other links within this space by using the z-index property.

For the lazy amongst you, the HTML…

<div class="linkDiv">
Some content goes in here
	<a href="linkGoesHere"><span class="linkSpan"></span></a>
</div>

…and the CSS…

.linkSpan
{
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	z-index: 1;
}

.linkDiv
{
	position: relative;
}

Newest Photo/Video

The Client has asked for three equal boxes along the bottom of her page, each one containing something different. Notably, she wants to show the most recent video (always YouTube) from her blog, and the most recent image from her blog. These should have the title of the blog post displayed, and the whole thing be a clickable link to the relevant post.

I wondered about going and finding a plugin to do these, but I decided that the overhead of most plugins would be a little large and pointless, and as I know SQL and have a good idea of regex, I’d just write them in myself. Three lines of SQL, regex and HTML (for each image) later, and I’ve got the relevent images in, searching on how the client has been adding videos and images to the site. Video’s come in square brackets courtesy of a plugin.

$myImageRow = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE post_content LIKE '%<IMG%' ORDER BY post_date DESC LIMIT 1", ARRAY_N);
preg_match('/<img(.*?)\/>/',$myImageRow[4],$imageMatches);
echo $imageMatches[0] . '</br>';

$myVideoRow = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE post_content LIKE '%[youtu%' ORDER BY post_date DESC LIMIT 1", ARRAY_N);
preg_match('/\[youtu(.*)\/(watch\?v=(.*?)|(.*?))\]/',$myVideoRow[4],$videoMatches);
echo '<img src="http://img.youtube.com/vi/' . $videoMatches[count($videoMatches)-1] . '/0.jpg"/>'

The youtube image comes direct from YouTube’s image library. You can either go and hammer through the API to get it, or do what I’ve done, which is to grab the unique video code from the URL, and get the image direct from YouTube’s servers. They come in a number of different sizes, I’m using the full size image (0.jpg).

Getting the images to scale as I wanted (to always fill the container divs completely, but not lose their aspect ratio) took a little thought, but using the images as a centered background to the div. I thought I was going to have to go into some PHP for this one, but google was friendly and informed me of a cover attribute for the background size. This changes a little of the code above (I removed the img tags and instead used the container div directly), so you just need the following in your CSS for the divs – bearing in mind that this must be inline for your PHP to work.

background:url(http://img.youtube.com/vi/<?php echo $videoMatches[count($videoMatches)-1]; ?>/0.jpg ?>);
background-size:cover;
background-position:center;

Now the Title of the post can just be put into the Div in a mid range colour, and it will overlay the image nicely. The whole div can be a link without an issue, making it nice and simple! I wonder if someone *had* already written a plugin for any of this stuff…

Top Margin Frustration

I hate when people are clever in inventive and painful ways.

The Client (read ‘my fiance’) has asked to have her site look like the Double Negative site as a mock-up/baseline, with some extra special features on the bottom. She’s an artist, so she’s also asked me to set things up as a number of pixels, not a percentage of screen real estate. This is because she cares about the individual image quality of any given item as well as (if not more so) than the ratios of items in the screen space, but I digress.

The top of the DNeg site touches the top of the screen – and as you can see on this blog, the top of the WordPress page doesn’t. This has led me on a merry chase. The first bit is easy and obvious (if you dive into the code base and don’t google around like a lunatic) – you need to add the following snippet into your CSS

 #page {
   margin-top: 0px;
}

But there was still a margin at the top of the screen the I couldn’t get rid of. looking through the CSS sheets with Firebug (an excellent tool) I discovered a sheet entirely for that 28 pixels of space. It may then have taken me a good ten minutes, but i realised this is where the login menu for the site would normally be. I’ve turned the WordPress bar off, but all that’s done is change the “display” style to “none”. it’s not actually removed the item, so the 28 pixels of space it uses is still there. *sigh*

Upon logging out it disappears, so it’s not a big issue, but I might dig in and see if I can find a better way of removing the menu bar later.

Create your own website, free on WordPress.com.Create your own website.
Start free