Liquibase Persistence Layer

Make Your Persistence-Layer Production-Ready with Liquibase

Software developers working on different systems or applications usually start small or from scratch. During the development they focus on the requirements and making things work (functional). However, once the project reaches maturity, things tend get challenging. Thankfully, Liquibase can help.

There are so many production-related problems that are not visible during the development. But we are here to focus on “Persistence”-related problems.

Issue#1: Multiple Environments

Let’s assume you have 1 project. For this example, we can call your project: Project Cement. During Project Cement’s production phase, if the team will be following the SDLC V-Model where each phase corresponds to a testing phase, the project will be needing the following environments.

  • Local environment
  • Team environment
  • User-Acceptance Test (UAT) environment
  • Production environment

Now we have 4 environments, and this is just the usual setup. There’s a possibility that the project requires more depending on the situation.

But wait there’s more, our problem doesn’t end there. For each environment, there’s a possibility of having multiple databases and multiple schemas.

Maintenance = No. of Environments * No. of databases * No. of Schemas

In translation, this formula simply means it is hard to maintain.

Observance:

Developer 1 was assigned to create a feature that requires a schema change, he/she finished the task, tested his changes on his local environment and everything was working fine. He applied the new feature to the team environment where the team QA will perform extensive testing.

Developer 1 being agile and eager, wants to utilize his working hours and started on a new task.

After a while, the team QA announced that the feature is now ready for UAT environment.

Developer 1 working on a new task, was too busy. He/She applied/pushed the code changes to UAT environment, but forgot the schema changes. Therefore, the feature he created failed miserably on UAT environment. Now, imagine that happening on production environment where there’s higher risk.

Moral of the story: Multiple changes are hard to maintain and prone to error.

Solution: Package the schema change with the project codes with Liquibase because it is a tool that can manage database schema by having the versioning feature which makes schema, easier to refactor/change, rollback in case of a problem and deploys on multiple environments.

Issue #2: Migration to another RDBMS (Relational Database Management System)

Observance:

Project Cement was already in production, and the client has decided that instead of using open-source solution. They want to use a proprietary (paid) product. This means that Project Cement’s persistence layer will be migrated from a free one MySQL Database to Oracle Database.

With the given deadline, Developer 1 escalated that it will not be feasible, and will require a lot more work to migrate. The client was persistent, and still pushed the migration. Developer 1 was left with a tremendous workload to migrate everything while asking himself “Why??”.

Solution: Developer 1’s misery should have been avoided, if the team used Liquibase. Simply because it is a tool with the ability to adjust to multiple types of RDBMS, where it has the attribute of liquid (which is self-explanatory). It can adjust/take shape of whatever RDBMS the project requires.

Issue #3: Creating a fresh database

Observance:
Having an existing system, with multiple environments, developer 1 was asked to create a new environment. The problem is that all the existing environment has existing data so developer 1 only have 2 options.

  • Option 1: Create a SQL dump that contains only the schema
  • Option 2. Create a SQL dump that contains everything and delete the unnecessary data.

Both options will consume more time than expected. Option 1, will require the initial data for system initialisation such as Admin account and application config/whitelist/secrets. Option 2, then, contains everything but deleting the unnecessary data is prone to error and re-work.

Solution: Use Liquibase, because it’s a tool with the ability to do, versioning, for both schema and data change. Simply run it and everything you need will be there.

How to integrate Liquibase with your project

(This will be the standalone Liquibase flavor, as it can easily be added to your CI/CD automation pipeline. For alternatives, you can also check the maven implementation).

Step 1: Create the following folders inside your repository that contains the XML Liquibase script.

This might be the most simple and easiest step on the list, so enjoy it.

Step 2: Inside the config folder

You can have multiple environment config and credentials.

Set accordingly the database credentials , , <url/schema>

Step 3: Under drivers folder

Add drivers of the databases of your choice. (Note this will be used on config under driver and classpath properties.)

Step 4: Under db-updates folder, create the following files.

changeset-master.xml contains the execution included script files to be executed by liquibase.

changeset-update-01-create-tables.xml contains the scripts for creating tables.

Changeset-update-02-default-data.xml contains the script for creating default data such as admin account / initial configuration

SELECT COUNT(*) FROM service WHERE code = ‘default’;

code = ‘default’

Step 5: Under executable folder extract liquibase–bin.zip that can be downloaded on their website

(https://download.liquibase.org/download/?frm=n)

Step 6: Tag (snapshot current version) the database before running Liquibase so that you can perform a rollback.

By executing while on Liquibase/executable folder

java -jar liquibase.jar –defaultsFile=../config/localhost.properties tag freshdb

Step 7: Execute update that will create tables and default data

java -jar liquibase.jar –defaultsFile=../config/localhost.properties update

Step 8: (Optional) When there’s a problem, perform a rollback.

java -jar liquibase.jar –defaultsFile=../config/uat.properties rollback freshdb

Notes:
– You can create multiple Liquibase scripts just add it to the changeset-master.xml

– Take note of the “id” attribute because Liquibase will run it in sequence

– when you mess up, it’s easier to re-create schema and run Liquibase.

Contributor:
John Morales
Sr. Java Developer

__________________________________________________________________________

Read Next: The Truth About Game Development


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically all team members to share technicals skills, development hacks, and industry knowledge to the entire family.

We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions.

This helps us keep our minds sharp and always up to date with the latest in software development, mobile development, and emerging technology.

You can count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime and we’ll help you out.

SODEC Expo

Monstar Lab PH Joins Japan’s SODEC Expo

Japan, the third-largest IT market worldwide (valued at more than $173 billion), held the 27th edition of its largest IT expo in Tokyo last May 8 – 10. Such an expo being the Software and Apps Development Expo or SODEC.

SODEC has since been known as one of Japan’s prime business events. For a large number of Japanese IT/software development executives, SODEC has been a tradition.

The event showcases cutting edge solutions. For years, it has been featuring a variety of products for development, operation and maintenance of software and apps from technology providers coming from all over the globe.

The Philippines takes part in this expo annually. Doing so through the initiatives of Philippine Software Industry Association (PSIA). And this year was no exception. We made sure to mazimize PSIA’s 17th Business Mission to Japan.

Monstar Lab Philippines, together with the delegation of 8 Philippine software development companies, looks to showcase Filipino development talent and expertise to a bigger audience in Japan. As the expo opens and has opened opportunities for business matching and exposure, there’s no doubt that this year won’t be our last!


Read Next: 3 Outsourced Tech Partner Must-Haves


We take customer service seriously here at Monstar Lab Philippines. That’s why we ensure excellence in coordination and communication. Thanks to over a decade of offshore engagement experience, we have honed our such craft.

Let us know what problems you are trying to solve and we’ll craft the best technological solution for you . You can count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime. We’ll help you out.

You can also check out our case studies here. We’ll be waiting!

Fuzz

US Digital Agency Fuzz Joins Monstar Lab Group, Strengthening Global Presence

Tokyo, Japan – April 8, 2019

Digital product agency Monstar Lab, Inc. has announced that it has acquired a stake in American digital agency Fuzz Productions, LLC. (hereinafter “Fuzz”). Fuzz is the latest step in the Monstar Lab roadmap towards becoming the leading digital product agency in the world with a focus on a strong presence in the three major markets of Asia, Europe, and North America.

Monstar Lab’s focus is to serve enterprise clients around the globe with digital transformation*1, digital product development and market localization and growth. Fuzz, with headquarters in Brooklyn, New York, will enable Monstar Lab to serve clients with a US-based team of best-in-class engineers and creatives. Further, it will allow the Fuzz team to be amplified by the scale of the Monstar Lab group of more than 1100 people across the globe and thereby take on bigger projects and more specialized offerings.

The plan is to grow the existing Fuzz team in size and reach together with the existing management team. Monstar Lab CEO Hiroki Inagawa;

“We are very excited to have Nat and his team join Monstar Lab Group. With Fuzz we are not only partnering up with a team that can deliver world-class digital solutions for well renowned brands like Shake Shack, United Technologies and AB InBev. We also get a strong and proven management team that shares our vision and values and that will allow us to expand our presence in the US even further.”

Fuzz CEO, Nathanial Trienens;
“Joining the Monstar Labs Group is a significant milestone for Fuzz, opening channels to new markets and partners. Our ability to pursue both global and domestic opportunities is enhanced greatly by the support and access to talent that the group provides. I couldn’t be more excited to work with Hiroki and the Monstar team in executing our shared vision.“

*1 Definition of “digital transformation”
Creating new value for existing business structures by utilizing digital technologies

About Fuzz

Fuzz is an award-winning digital agency headquartered in New York, with approximately 80 engineers, designers, strategists, and product managers providing digital transformation via user-centric design thinking and cutting-edge technology for leading brands and innovative startups, including CBRE, Shake Shack, Potbelly Sandwich Shop, Peloton, and AB InBev. In addition to consulting and custom design and development, Fuzz offers the Koala platform for restaurant chains. Koala enables one-stop management of branded online ordering, marketing and loyalty programs across kiosks, web and mobile apps, with customers including Wingstop, Taco Cabana and Papa Murphy’s.

About Monstar Lab, Inc.

Headquartered in Shibuya-ku, Tokyo, Monstar Lab, Inc. provides digital product business, co-working space business ”Monstar Hub”, music distribution, and mobile game development and management services from offices in 26 cities in 15 countries throughout the world. With “global sourcing” as the foundation for all of Monstar Lab’s activities, the company has a team of 300 engineers and creators in Japan and roughly 1200 worldwide serving customers with the optimal resources from the optimal locations.

As of 8th April 2019, Monstar Lab, Inc. has offices in Tokyo, Osaka, Matsue, Fukuoka, Beijing, Qingdao, Shanghai, Chengdu, Dhaka, Bangkok, Hanoi, Da Nang, Manila, Cebu, Singapore, Copenhagen, Aarhus, Amsterdam, Dnipro, Prague, Berlin, London, Manchester, Dubai, New York and Boulder. Visit Monstar Lab’s global site at https://monstar-lab.com/global/.

Press Release from:
Monstar Lab Global


Read Next: 5 Tips for Better Coordination with Your Outsourced Tech Partner


We take customer service seriously here at Monstar Lab Philippines. That’s why we ensure excellence in coordination and communication, thanks largely to over a decade of offshore engagement experience.

Let us know what problems you are trying to solve and let’s craft the best technological solution for you . You can count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime and we’ll help you out.

You can also reach out to us.

New Office in Dubai, Middle East

Monstar Lab to Enter Middle Eastern Market with New Office in Dubai

Tokyo, Japan – April 3, 2019

Digital product agency Monstar Lab, Inc. has established a new office in Dubai (Emirate of Dubai) called “Nodes Middle East” for new customer acquisition and market expansion in the Middle East. This office will become a new office of Nodes, which is part of the Monstar Lab Group.

The New Dubai Office

By establishing a sales office in Dubai, known as an international city in the Middle East, Monstar Lab aims to achieve new customer acquisition and market expansion in the Middle East, focusing on the Gulf Cooperation Council (GCC), which has a particularly high GDP per capita.

Monstar Lab already works on IoT product development, etc. in Saudi Arabia and the Careem Now food delivery app that is popular in the Middle East via its group subsidiaries, Nodes, and will also strengthen its work for assisting its existing customers.

“Usually, when entering a new market, we establish a physical presence. But in this case, we landed a deal with Careem before we could look for office space. You could say our Dubai-strategy was actually put together in reverse order due to the good relationship with Careem”, says Nodes Agency’s CEO, Andreas Rasmussen.

Andreas Rasmussen stresses that entering the Dubai-market was always part of the international growth strategy.

“We’ve always wanted to establish ourselves as a top 5 digital agency in the Middle East. The region has an impressive and growing innovation and tech scene and after launching the Careem NOW app opening up a new office in Dubai was the natural next step to strengthen our global position”, says Andreas Rasmussen.

CREATE AN ECOSYSTEM FOR EMPOWERING DIVERSITY Web, Game, App, Illustration https://monstar-lab.com/global/

Overview of Dubai Office

Address: Almas Tower Jumeirah Lakes Towers PO Box 48800 Dubai, United Arab Emirates
Established: Early April 2019
Representative: Andreas Straarup

About Nodes ApS

A European subsidiary of Monstar Lab that conducts digital development based on cutting-edge technology and stylish design. Since being established in 2008, has had its head office in Copenhagen, the capital of Denmark, and currently employs approximately 120 engineers, designers, and consultants at nine offices over Europe.

About Monstar Lab, Inc.

Headquartered in Shibuya-ku, Tokyo, Monstar Lab, Inc. provides digital product development, coworking space business ”Monstar Hub”, music distribution, and mobile game development and management services from offices in 24 cities in 14 countries throughout the world. With “global sourcing” as the foundation for all of Monstar Lab’s activities, the company has a team of 300 engineers and creators in Japan and roughly 1100 worldwide serving customers with the optimal resources from the optimal locations.

As of 3rd April 2019, Monstar Lab, Inc. has offices in Tokyo, Osaka, Matsue, Fukuoka, Beijing, Qingdao, Shanghai, Chengdu, Dhaka, Bangkok, Hanoi, Da Nang, Manila, Cebu, Singapore, Copenhagen, Aarhus, Amsterdam, Dnipro, Prague, Berlin, London, Manchester and Dubai. Visit Monstar Lab’s global site at https://monstar-lab.com/global/.

From: Monstar Lab Global


Read Next: Monstar Lab PH Wraps Up Java Training Program for 2019


We take customer service seriously here at Monstar Lab Philippines. That’s why we ensure excellence in coordination and communication, thanks largely to over a decade of offshore engagement experience.

Let us know what problems you are trying to solve and let’s craft the best technological solution for you . You can count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime and we’ll help you out.

You can also reach out to us.

Java Training Program

Java Training Program 2019: Completed!

It has been part of Monstar Lab Philippines’ tradition since its Ideyatech days to search for the next best developers in this part of the region through the Java Training Program. This has been going on annually since 2007 and have seen 10 batches produce top notch developers. The program’s graduates helped propel Monstar Lab Philippines to where it is today.

The Java Training Program starts with a pool of developers consisting of a variety of aspirants that may include fresh graduates to experienced professionals. They undergo several weeks of intensive training and series of exams. Each phase will inevitably dwindle their number down until only the cream of the crop gets through the entire program.

Yes, there were casualties but we have uncovered gems that became integral part of the team and contributed greatly to bringing great projects to fruition. 2019 is no exception, this batch has truly shown talent and potential.

Meet the graduates of this year’s gruelling Java Training Program:

  1. Alfredo Borja
  2. Bea Marasigan
  3. Christian Garillo
  4. Perf Clemente
  5. Sushmita Jadulco

Contributor:
Gabriel Valmonte
Marketing Manager


Read Next: Monstar Lab PH: 2018 in Perspective


Monstar Lab Philippines is the breeding ground of awesome tech talent and with programs such as the Java Training, we ensure the quality of developers we have in the fold.

Do you think you have what it takes to be part of this global organisation? Check out our careers page and we’ll see you around.

Mobile Application Development

Best Practices For Creating Mobile Applications

Mobile applications are already considered a big part of our lives nowadays. For every activity we do on a daily basis, there is already an application that can assist us and can make our lives easier.

But are you wondering what it takes for a developer to create and provide us our daily applications fix? Below, we’ll discuss the different practices in order to have a successful application.

Research

Before diving straight into development, the team including the designers, developers and all the people involved in the application should first conduct research. Research what kind of app you want to create.

By conducting research, you will have an idea of what would be the primary function of your application. Can this app solve any problem we encounter every day? Who would be your target users for this application? Is there a similar application available and what would make the users choose your application over the existing ones in the market?

Decide which platform you’ll be developing for first.

This decision will also become easy based on the research you’ve already done for the application. Based on the target users, you will know which platform those users commonly use.

Another factor is which platform the application would be easy to develop on. The goal of every new application is to release it to some users, if not to the general public, as soon as possible. The reason for this is that you will never make your application perfect, but you can continuously improve it by getting continuous feedback from initial users.

Keep it simple at first.

Usually, successful applications are apps that offer a single functionality. Applications with lots of mini-applications inside may confuse the users that will make them not use the app anymore. As mentioned before, you can still add more functions based on the demand of the users.

Get the opinion of the users.

Users will drive the direction of your app. Users are mainly the customers of the application. As a developer, a certain feature that you think is a great idea may not be that great to a large number of users. This will also guide the developers to plan for future releases.

By following these guidelines, you are already on a good start when you develop your new application. Good luck!

Contributor:
Roselle Elefante
Android Developer


Read Next: 5 Tips for Better Coordination with Your Outsourced Tech Partner


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically every team member to share technicals skills, hacks, and knowledge to the entire family. We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions. This helps us keep our minds sharp and always up to date with the latest in software development, mobile development and emerging technology.

Monstar Lab Philippines can also help you develop your own mobile application or whatever digital solution your business needs. Feel free to send us a message anytime and we’ll help you out.

Game Jam Skills

Test Your Skills in Game Jams

One of the best ways to test your creativity and programming skills is to join a game jam. A game jam is a hackathon for video games.

Ludum Dare is the longest running and largest online game jam in the world. It is held on a weekend three times a year (April, August, December). Participants make a game that is based around a certain theme. There are two versions of competitions you can choose to join.

The first is called “Jam”. In Jam, participants must finish their game within 72 hours of development time. They can do it solo or they can be in teams. Resources from the Internet, such as art and sound, can be used as long as they have the rights to use it.

The other is called “Compo”. This one is harder because you only have 48 hours to finish your game and you must do it solo. In addition to that, you cannot use resources from the Internet. That is, you must do everything from scratch. After the competition, participants play and rate other people’s games to later determine the winner.

There are no prizes for the winners, only bragging rights. Some games are so good that it reached the Steam platform when the creators continued the development after the event.

I participated in Jams four times but only two of them made it to submission. If you are planning to join one, here are some tips to be able to finish.

Plan your game.

When the theme is announced, you should list down your ideas. Think about what could be the core gameplay on those ideas and choose which one best suits your skill level. Don’t choose the one that’s very far from your skill level as you’ll likely not finish on time. Scoping your game is a must especially for game jams. Scoping is limiting the features your game will have. It’s easier to complete and polish a game with smaller scope. It also helps to draw the flow of your game including the screens from start to end.

Prototype your game.

Start on prototyping your game. Code the game without the art; just use simple shapes as placeholders for art. Try to play it multiple times to see if it’s fun. If you think it’s not fun then you can tinker with your original game idea. Prototyping helps to see early on if a game mechanic works or not or if it’s fun or not.

Have time to sleep.

You only have 2-3 days to finish your game but it is also important to have some sleep. You don’t really need to get 8 hours of sleep, a few hours of sleep just to recharge yourself will do. Having no sleep obviously hinders your productivity. I’m impressed with participants of Compo who only have less than 48 hours (since they also need to sleep) and still manage to finish everything. Really shows that they know their craft.

Eat.

Have proper meals. Have some snacks beside you. You don’t wanna deprive yourself of food during the jam. Drink some caffeinated beverages if you want as you’ll be staying longer than usual.

Lastly, have fun!

Have fun making your game while knowing at the end that you’ll have finished something to show to other people. If you don’t finish by the deadline, that’s okay! At least you have done something and you definitely have learned some things throughout the jam. You can try again on the next Ludum Dare and apply the things you have learned. Don’t worry about not finishing because you’re not alone.

Here is my entry for Ludum Dare 38 which was held on April 2017:
https://ldjam.com/events/ludum-dare/38/strategic-survival

The next jam, Ludum Dare 44, will be on April 27-30, 2019. I might participate in this one. Come and join me!

Contributor:
Marvin Bables
Java Developer 1

On A Side Note:

Monstar Lab Philippines recently sponsored CIIT College of Arts and Technology as they joined Global Game Jam 2019 this past January 25-27, 2019. This event saw the participation of thousands of developers, students and even professionals from around the world to deliver the next big game within 48 Hours. Read about it here.


Read Next: Monstar Lab PH Joins Japan’s SODEC Expo


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically every team member to share technicals skills, hacks, and knowledge to the entire family. We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions. This helps us keep our minds sharp and always up to date with the latest in software development, mobile development and emerging technology.

Monstar Lab Philippines can help you develop your own game or whatever digital solution your business needs. Feel free to send us a message anytime and we’ll help you out.

Software Testing Basics

Going Back to Basics: Software Testing

Software testing is really both a science and an art. For a better understanding and appreciation of its duality, let’s look into basics!

What is software testing?

It is an activity that checks if software systems work as expected based on requirements. It can sound so simple and easy to do, but believe me, it’s not. Here’s why:

The role of software testing:

Software testing is a vast field. It can range from simply comparing the alignment of web fields to checking how secure an app is. The role of software testing varies depending on what type of quality you are looking for.

  • Do you want just want to test if the functionality of your app’s registration form works based on your functional requirements? Testers can do that for you using functional testing.
  • Do you want to check if your app is easy to use by your target market users? Testers can get it done too through UX testing.
  • Do you want to check if your app processes user request quickly? Performance testing can be executed by the testers.

These are just some of the roles of testing, there are still lots of it out there. Depending on your quality needs, the role of testing adjusts.

Why do we do software testing?

With these testing activities, one can ask, what do we get from it? Is it worth the investment? The answer is yes. Many organizations have tried to cut costs on software testing during the early phase of software development. But sooner or later, repercussions caught them unguarded during the production phase.

One of the typical stories we get from the software development industry is this:

“Stakeholders decided to remove the tester from the development team to “save costs”. They immediately achieved it – no tester, lesser cost. 3 months later during the early stages of the production phase of their product, the app gets buggy.

Customers can’t properly use the app and aren’t happy. Clicks don’t convert to sales, business reputation gets damaged and that’s just the tip of the iceberg. The stakeholders start to feel the sting of these bugs. They finally onboard a tester to the team and issues from prod server were discovered one by one.”

The problem with this is that bugs found in the production phase are costly!

It’s beyond the “savings” they got from cutting the tester earlier on. Not even close. Bugs need to be discovered, investigated, fixed then re-tested immediately. That process involves the entire dev team which entails a higher cost.

Software testing is one of the crucial parts of software development. Neglect quality now, and it’ll bite you fast and hard later on. Quality is simply non-negotiable.

Contributor:
Kevin Badilla
Software Quality Assurance Manager


Read Next: US Digital Agency Fuzz Joins Monstar Lab Group, Strengthening Global Presence


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically all team members to share technicals skills, development hacks, and industry knowledge to the entire family.

We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions.

This helps us keep our minds sharp and always up to date with the latest in software development, mobile development, and emerging technology. You can definitely count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime and we’ll help you out.

URL Shortening

How You Can Do URL Shortening

URL’s or ‘Uniform Resource Locator’ is an integral part of our day-to-day life on the internet. They are the mechanisms in which we jump from one page to the other as we search with Google or follow up on an interesting post on Facebook. As the internet increased in popularity and people started to create their own content, the previous practice of hand-crafting links became obsolete. Now, content management systems generate the links via an internal logic that creates enormous links like this, https://www.facebook.com/builtable/?__tn__=kC-R0.g&eid=ARBPC_wY3Mw7S52Bu09GfhTXAZRams5iYYQVw1cWaIAo.

And thus the art of URL shortening was born.

What is URL Shortening?

URL Shortening is, in essence, creating a short link that redirects to its longer counterpart. There are many ways to achieve. However, the most common approach is to generate unique keys to each URL you want to shorten, and then pair that will a root URL or domain. An example would be

https://my.domain.com/1bNsLrK

Additionally, any modern URL shortening service is expected to not only store millions of qualified links. It should also find and serve those links in seconds.

The Art of Short Links

Following the algorithm presented above, the first order of business is generating a unique key for every link that’s submitted for shortening. If you are using a relational database, the natural candidate for this is the primary key of the table that you are using to store the original links.

Using the primary key also solves the issue of speed talked about earlier. Using it ensures that the record can be retrieved in the quickest possible manner.

As convenient as using the primary key is, it also has its own limitations (security issues aside). Imagine recording your trillionth link. Here is what it would look like…

https://my.domain.com/1234567890

And while this link is short enough (kinda), it also highlights the fact that as your database grows, the links it generates is going to get longer over time.

A popular though an imperfect solution is to “compact” the primary key. This can be done by converting it to a higher base or radix. For example, let’s convert our previous primary key in the decimal system (base 10) to the higher hexadecimal system (base 16)

1234567890 => 499602d2

If you do a count its 10 vs. 8 characters, that’s a 20% savings on the length of the text. Using a higher radix/base system should provide a larger benefit.

With this foundational knowledge, you can now go ahead and create your own link shortening service. There are other topics we can discuss to enhance the service such as creating your own base system for better security, but it’s best that we leave it to another article.

Contributor:
Irving George Menil
Senior Developer

Original Content:
Nathaniel Martinez
Java Developer 2


Read Next: Make Your Persistence-Layer Production-Ready with Liquibase


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically all team members to share technicals skills, development hacks, and industry knowledge to the entire family.

We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions. This helps us keep our minds sharp and always up to date with the latest in software development, mobile development, and emerging technology. You can count on the expertise of our team to design and deliver top-notch enterprise software solutions. Feel free to send us a message anytime and we’ll help you out.

Game Development

The Truth About Game Development

There’s much that society needs to learn about the truth of game development. That said, we’re dropping in with some hard but valuable facts!

Game development is hard!

As a programmer that develops mostly web applications for a living, I find developing games much difficult, but it’s the kind of hardship that I enjoy. From the mathematics on how a projectile should move, to the character aesthetic choices, to the intricate level designs, and to the subtle game design that players won’t notice but adds to the overall enjoyment. These parts of game development challenge my logical and artistic skills that I can’t find anywhere else on the software development spectrum.

But recently, I’ve learned one of the more important things in game development, and that is knowing the constraints of our project. For us, it’s the small team with little experience on it, and the budget that only covers the basic necessities (time, code repository and learning materials).

In order to facilitate these constraints, we’ve decided to build a game within the scope of our skills, and the use of free tools to create the game assets.

The first thing is the scope.

It’s easy to get lost with all the excitement when throwing ideas around, especially on our first game. Features that aren’t necessary to the core gameplay should be dropped and build something from what we know and have instead. If a core feature is a bit complicated for us, we break it down to its basic form. Keeping things small and simple makes developing a game easier and faster. The goal for our first game is to create something playable.

The second are the tools we are using.

Open-source softwares are great, and most of them are free. They’re great alternatives to proprietary software if you don’t have the budget for it. The availability of free open-source software for different kinds of applications covers the necessary processes of game development. We use Libgdx as our framework, GIMP for graphics, LMMS for sound and music production, Openshot for video editing and if we start with 3D graphics there’s Blender. These top-notch tools are enough for us to develop a complete game.

These are the challenges we’ve encountered since we started our game development group and we’ll be expecting more along the way.

Try one of the games we have developed (courtesy of our very own Marvin Bables). It’s simple but is a lot of fun. Check it out! Download the game. (currently for android devices only, sorry iOS guys!)

Article Contributor(s):
Leand Ching
Java Developer 2

Mobile Game:
Marvin Bables
Java Developer 1


Read Next: Test Your Skills In Game Jams


Here at Monstar Lab Philippines, we encourage our engineers, developers, and practically every team member to share technicals skills, hacks, and knowledge to the entire family. We conduct regular Tech Talk Tuesdays (or Thursdays) more popularly known as T3 Sessions.

This helps us keep our minds sharp and always up to date with the latest in software development, mobile development and emerging technology.

Monstar Lab Philippines can help you develop your own game or whatever digital solution your business needs. Feel free to send us a message anytime and we’ll help you out.