The Artistic Way of Programming

12 years back, when I started my formal classes in computer science, the first thing I learnt was “data” means “information”. A few days after that, we started conventional programming, where code and data were treated separately. For example, only data can be passed as the functional arguments. It was difficult for me to digest that “code, which is also information, is not treated as data”. I strongly felt that this will increase complexity of softwares in the long run.

A system does three things – read, transform (processing data), write. In other words – the mathematics (the transform part), and the effect of that in real life (the read/write part). The data transformation is indeed a mathematical concept, and with the help of read and write we make the mathematics (the transform part) useful to the real world. Bringing the “transform” part fully inside mathematical domain has its own benefit of using mathematics without fear (possible errors) for the analysis of the system, making the system more tractable mathematically. The catch is to treat both the elements of transformations, data and functions, equally.

Initially, code used to be bigger than the data, so sending data over the wire was feasible. But with time, data becoming huge, sending code to systems over the wire becomes the need, resting the data on the systems intact. With big data, the need of the hour is to treat the code as data, so that the code can be taken as argument to another meta function on a system having huge data which expects an algorithm for transformations.

Roughly speaking, codes are algorithms, algorithms are mathematical functions, functions are in turn actually look-up tables, i.e. data. Hence with this principle, all codes or functions are data.This is exactly the cornerstone of the functional paradigm. The functional programming is programming with functions, they treat functions and data likewise. Another principle I love, to control complexity, rules should not be complex itself.

Thumb rules rewritten for the functional paradigm:

Read-write and transformations(algorithms) should be separate.
Use immutable variables. Discourage use of reassignment statements.
Discourage side-effects (input/output or changing any variable in-place), every function should ONLY return its expected result.
Use referentially transparent functions (sometimes it is called pure functions) with no side effects, i.e. if x = y, f(x) and f(y) should be same forever.
Unit testing is a must for each function.
One of the main design patterns should be followed is to use expressions instead of instructions, i.e. it should be declarative in nature. Discourage use of loops like for/while – use recursive statements as shown above to calculate sum. Tell computers what needs to be done, not how to do it – it reduces error, especially edge cases.
With the need to control the complexity of the system and the advance design, the design pattern for the functional composition can be made to follow some basic algebraic structures, which in turn becomes more robust.

Posted in Uncategorized | Comments Off on The Artistic Way of Programming

Economic Cycles, Stock Market Crashes and the Scary Scenarios

Here we are ready to inaugurate a new president in 2017 and our stock markets are at all-time highs after a huge ‘Trump Bounce’ after the election. Many that study stock market history admit that we are in a need for a pull back as the DOW is almost ready to break 20,000 pts. What does all this mean?

Well, many analysts are suggesting it is very possible we could get a market correction in mid to late 2017 and that it could be 10-20% by the time it is done, the longer this nonsense goes on, and the bigger the bubble builds then the bigger the drop, we are over bought, almost everywhere. Then all that money printed that ended up inflating emerging markets will look for safe haven, coming back here in the short term. As those go one-by-one, that money flies out, because the money is looking for the nicest looking house (for now) in a majorly bad neighborhood, look at the EU, Japan, Middle East, India, and who knows what the hell China’s real numbers are, they have one thing going for them, they own our debt – but that might not be worth much if things go on. All that money coming back to safe haven in the US will cause inflation here, but at what cost?

Cheap loans, another bubble burst and look at the Student Loan issues 35% in default (past 90-days) and cheap car loans is only producing higher repo rates which are hidden by increased sales figures. It’s all lipstick on a big pig, socialism doesn’t work and you can’t have utopia unless you build it, and that takes capitalism which we are crushing into next week for the falsehood of cronyism. But I digress.

If we don’t get a back pedal on the stock market soon, it will all come at once, and 2008 was 8-years ago remember? That wasn’t a recovery that I’d be bragging about – basically we’ve increased regulations, size of government, and cut our military – all very stupid things to do in the present period. We are digging a hole, and I assume when if it starts to fall apart the left will blame capitalism and get their people back into power – and they will just make things worse – this seems to be a repeating problem with humanity doesn’t it? That is what socialists always attempt to do, but it all collapses anyway – Venezuela, Argentina, Greece, Spain, Italy, Portugal, Zimbabwe, hell, how about that Arab Spring a few years ago, still in shambles – Libya, Egypt, Tunisia, Syria, Yemen, who’s next? Jordan, Turkey, Saudi Arabia? Civil unrest, food shortages, people will demand what was promised and take down their governments to get what’s left. Beware the socialist mobs. But I keep digressing.

Posted in Uncategorized | Comments Off on Economic Cycles, Stock Market Crashes and the Scary Scenarios

The Future of Android Games, Virtual Reality & Augmented Reality

Mobile gaming has come a very long way since the introduction of crude & simple games like Snake and Pong which were available on early Nokia phones. Mobile processors and graphics are now as powerful as desktop computers were just a few years ago. Older generations still remember lugging around a Game Boy or Game gear and begging their parents for another game. New generations literally have access to 100’s of thousands of games on their mobile device.

In short, mobile gaming has exploded in just a few years time. In the month of July 2016 there were 63.1 million arcade games downloaded & games in the “strategy” category generated $195M revenue. In a recent study over 37% of mobile app users with 30 minutes of free time choose to play games over any other activity. We’ve all seen it and we’ve all done it ourselves, whether its waiting for an appointment or sitting at the airport, we pull out our mobile device and jump into a quick game to kill the time.

So what does all of this mean for the future of android gaming? For starters, the massive amounts of revenue and user interest in android gaming has bolstered continuous innovation and fierce competition in the global marketplace. For example, just 12 months ago, top executives were saying they didn’t see any major benefit to augmented reality. With the release of Pokemon Go and estimates citing as much as $500 million in revenue in just 60 days, I think we can all agree augmented reality is here to stay. Virtual reality is another area that has been picking up steam in recent months. You can now buy virtual reality headsets at local gas stations for a mere $30. Or if you’re on a budget you can purchase Google Cardboard for as little as $7.00. There are still only a limited number of VR enabled games but that number is increasing daily. Not only that, as more and more people experience VR we are sure to see a blockbuster release sooner or later.

Let’s take a look at some real life examples of recent game releases. Dawn of Titans which was recently released on Google Play was in development for over 2 years. This is akin to the development cycle of a mid-level PC game release on Steam. The game features mass controlled troops, world building elements and impressive graphics. A few years ago this would be considered a major release for the Android platform. These days this is just another drop in the massive pond. With over 2.4 million apps and games currently listed on Google Play it’s become harder and harder to stand out. This is actually good news for gamers as developers are working harder and faster to create new innovative titles to attract users.

I firmly believe that both Virtual Reality (VR) and Augmented Reality (AR) titles are going to gain more traction in 2017. Major developers who can pump out triple A content can’t be left in the dust while indie developers pump out AR and VR enabled games. They will be forced to port existing titles and come up exciting new ways to interact with the mobile devices.

There are many gimmicky games available that utilize the phones microphone, gyroscope, camera and accelerometer. However, these sensors combined with AR and VR could bring a whole new experience to gamers. Imagine walking through a recreated 3D world that represents your neighbourhood, immersed in full virtual reality, and using your phone as a targeting device to defend against waves of zombies. This is already possible with the technology that is available, it just needs to be packaged in a user friendly way that people can enjoy. Combining meticulous graphics with well thought out virtual reality experiences would be impressive indeed. If you’re familiar with PC based virtual reality demo’s you already know how immersive the experience can be. It’s only a matter of time before these same experiences make their way to our mobile devices en masse. And to think, only 30 years ago we were playing Mario on our beloved Nintendo consoles. Let’s not even mention the Virtual Boy that burned your eyes after 2 minutes of playing tennis. Android games and mobile games in general have come a long ways since then and they will continue to push barriers even further in the near future.

Posted in Uncategorized | Comments Off on The Future of Android Games, Virtual Reality & Augmented Reality

A Colour Forecast For Spring 2017

Forget the monochrome look, forget restraint. One of the strong trends that we can look forward to in spring 2017 is vibrant colour. Think wacky, age of Aquarius style psychedelia. Many of the looks that will come to the fore in spring of next year are going to be a riot of colour. This is great for those of us who love vibrant shades and are not afraid to stand out from the crowd, though perhaps not so good for shrinking violets or those with a more muted aesthetic.

Tie dye is back and there is something of a resurgence of the hippie fashion aesthetic. For Resort, designers showed a range of tie-dye clothing. Both inner and outerwear items were shown and there was plenty of colour on display, much of it in bold, rich tones that are all about the character and the playful wackiness. Spring summer 2017 could be the time to revisit the Summer of Love. But this psychedelia has a sort of contemporary edge, with bold shapes, geometric designs and a strong line in global multiculturalism that reflects our more connected modern age. The way to wear this multi-coloured extravaganza is definitely to give it some gusto, but also a bit of an edge. Think whimsy but with a slightly harder urban slant.

The key to looking up to date and not like you have been lost and wandering on the hippie trail since the 60s is to choose pieces with a more modern shape when going for rainbow coloured clothes. Mismatched patterns and quirky combos will edge this look into another spring summer 2017 look – the chic geek. The idea is that pretty much anything goes and you should let your freak flag fly, showing your own unusual and unique personality through the way you dress.

This colour extravaganza borrows not only from the pschedelia of the 1960s but also from the colourful aesthetic of Tibet, its woven fabrics, strong patterns and bright colours, all with a slightly spiritual bent. There is also a large dose of inspiration taken from Cuba, a nation opening to the US for the first time in over fifty years and one with a strong culture and tropical aesthetic. Colour inspiration is also taken from the northern Californian coast, rich mid-tone blues and beachy hues mingle in with brighter tropical colours. No matter where you look, the spring summer 2017 trends are all about colour. Developing a really good colour sense and knowing which colours will suit you is the key to looking good and finding your own perfect look for the coming seasons.

Posted in Uncategorized | Comments Off on A Colour Forecast For Spring 2017

Stay Healthy and Wealthy

When you make those New Year’s resolutions, you’re thinking about fresh starts and the year ahead. What you might not realize is that some resolutions also could save money. Here are some popular resolutions that could help get you and your finances in shape in 2017.

Quit smoking: You can save money by stopping a pack-a-day habit, which can cost between $1,825 and $3,650 per year, depending on the cost of cigarettes in your area. Nationally, a pack-a-day smoker is going to spend an average of $2,000 annually on cigarette costs.

Set up and stick to a realistic budget: If you want to resolve to stick to a budget in 2017, you must start with a realistic plan. People tend to make financial resolutions the same way they do a weight loss plan. If you start with lofty goals they will be unachievable within a month. List your priorities for spending rather than restricting your spending. Focus on necessary expenses then include a certain amount for retirement savings. Then with the remaining money you have each month, set aside a little for enjoyment. It’s critical you have rewards in your budget.

Exercise regularly: You’ll save money in several ways with regular exercise. On average, Americans are spending $7,800 annually on health care, according to the National Association of Health Underwriters. But exercise brings real savings. “If people are eating right and exercising three times a week for 20 minutes a day, they see prescription costs decrease by 70 percent and medical costs decrease by 30 percent,” says Ric Edelman of Edelman Financial Services. Stop spending money recklessly: One of the best ways to stop spending your money recklessly is to track where it is going each month. Check with your credit union and download their free mobile budgeting app that shows expenditures by category so you can monitor your spending. A great way to get your spending under control is quit trying to “keep up with the Joneses”. If you want to fix your bad spending habits in 2017 start hanging out with other spendthrifts because you will likely become one yourself.

Eat healthier: A healthy eating plan can be as — or more — economical than fast food. It’s a total myth that eating healthy is expensive. Buy smaller but leaner cuts of meat, eat protein-rich beans and buy produce in season when it’s freshest and least expensive. A smaller amount of a leaner cut can slice your food bill and your bad cholesterol.

Build an emergency fund: Nothing takes the stress out of financial situation like spare cash. If you are among the millions of Americans that don’t have enough money set aside to cover unexpected expenses or emergencies, then you should resolve to build one in 2017. Experts recommend putting enough money in a savings account to cover six months’ worth of expenses in case of unexpected emergencies like job loss, maternity leave or medical issues. You can always apply a small amount of your paycheck towards this account, so you make sure it is hidden from you.

Pay off high-interest debt: Paying down credit card debt is one of the most popular short-term goals in 2017. Try focusing on paying off your high-interest credit card debt before other debts because it is more expensive. And, it you are motivated by seeing those results first hand, start by paying off your card with the lowest balance first so you can feel that sense of accomplishment. Create your estate plan: An important 2017 resolution would be to tie up any financial loose ends for your loved ones so they aren’t left trying to pick up the pieces. Make sure you have a will or trust that designates who’s in control of your assets. You certainly don’t want the state court system to make that decision for you. Don’t forget to designate a guardian for your children, and someone who will make financial and healthcare decisions for you if you are unable to do so.

Develop common financial goals with your partner: Many times finances are the biggest source of conflict between couples. It’s important that couples sit down and create a financial plan. It doesn’t usually work to try and manage their finances separately.

Any of these resolutions can help improve your financial security in 2017. I suggest tackling one financial tip each month so you don’t get overwhelmed. Then as you get accustomed to the new approach to spending and saving, add another. By the time 2017 starts dwindling toward 2018, you will find you’ve made progress on achieving your financial goals.

Posted in Uncategorized | Comments Off on Stay Healthy and Wealthy