Posts in java

How Much Stuff Can You Fit in Memory?

So you’re given a limit on the amount of random access memory your program can use, how much stuff (ints, chars, booleans, bytes) can you cache in there before having to store it in physical media?

written in guide, java Read on →

Executing Highlighted Code in Eclipse Debugger

Just a short one for my sake since I keep forgetting.
Highlight a segment of Java code while on a breakpoint and press ctrl+u to execute, or ctrl+shift+d to execute and display the result. Helpful for when you want to check if a certain conditional that’s coming up in the next lines will return what you believe for it to return.

Having this is super handy and something I miss when jumping from Chrome’s javascript debugger that allows you to execute any arbitrary code in the console.

written in debugging, guide, java

Bejeweled Bot

source code
source game

Bejeweled Bot is a bot that automatically plays Bejeweled Blitz as fast as possible. Once executed, the bot will orient itself with the origin of the game board, determine the current gems on the grid, parse the possible matches, then move the appropriate gems in the game to create matches. I forked the repository from kklemm91 and improved on code organization, naming, and execution efficiency.

written in bots, java, postmortem, project Read on →

Text Twist Bot

source code
source game

Text Twist Bot is a bot made to play the anagram solving game Text Twist. Once ran, the bot will auto detect the location of the window, parse the current letters on the board, and automatically input all anagrams that can be found from those six letters. Of course solving anagrams is not new in the field of programming but whatever, revel in its glory!

written in bots, java, postmortem, project Read on →

Problems: Binary Tree Designs

sample binary tree structures based off threez nodes

So I’ve been brushing up and working with binary trees recently and I was pleasantly reminded how binary trees can flex and change while still maintaining the same data. It was fun testing self balancing trees when they would keep changing up on me. I got a little annoyed and my mind started to wander and wondered just how many different kinds of trees can a set of numbers create?

Problem: Given the amount of nodes in a set, how many different binary tree structures can be made from it?

written in java, problems Read on →

Unit Testing Random Behavior With Mock Objects

What happens when you’re trying to write some unit tests and suddenly you need to test a method with non-deterministic properties. In other words how do you test a method whose expected behavior is random behavior? The answer is with mock objects. I’ve seen a bunch of suggestions to use a mock randomizer but I haven’t seen anyone actually explain it further than that. Hopefully this will help someone out

written in guide, java, testing Read on →

Framework Frustration

Let me preface this by saying that I understand why frameworks exists. They solve repeatable problems in application development in a team environment by maintaining consistent development standards with tried and tested techniques that stood the test of time against thousands of projects and developer input that’s supposed to ultimately save the developer time. That’s great, that’s all really great. But, if it takes the user longer to develop the application with the framework than without it, then you have a framework deal breaker.

written in frameworks, java, javascript, programming Read on →