Skip to main content

Posts

Showing posts with the label Java

AWS Deployment, iOS11 updates and startup management

How did I get here ? yes that is the exact thought in my head right now, how did I get here? ( or this link ) Yes not long ago, I had a job that paid a somewhat decent amount, I was working on a very challenging (and interesting) project and I had plenty of time to play games. Right now: well I am still working on an interesting project, not getting paid (not yet) and I am getting very little time to play games. Ok so maybe not 'thaaat' different from my former situation except the part about the money. The point is that being a sole founder in a startup, I just have to so many things at the same time, I mean seriously think about this, I am building a Java Spring web version for My Day To-Do , I have to deploy it to AWS , learn new APIs in iOS 11, make iOS11 updates, make job descriptions, find more employees (interns) to work with me at my startup etc etc. The number of disparate (different) tasks I need to get my head around is just staggering. In this post I will be shari...

A developer's sacrifice - why did I say bye to my first love

I love writing code and during my undergraduate studies I had a chance to write code in many programming languages and while I enjoyed working with all of them, there was one language that I fell in love with. I call it first love and thankfully I had a chance to code in that language for most of my career after I finished uni. I worked with it for years and years, it would be my language of choice for any new project...until recently. In the last 12 months, certain (almost unavoidable) circumstances lead me to a choice which meant, I had a part ways with my first love for this particular project. In this post I will talk about what my first love was, the circumstances that made me part ways with it and what did I use instead of it. My First love During my undergraduate studies and when I was learning about programming, I was exposed to C++ , Java and C . I did not mind C so much, C++ I did not like it at the time and I loved working with Java. Yes yes, I know it's very ver...

An app about the Galaxy's finest smugglers(SW): Ionic app with a Java backend

In this post we will continue the story of Cpt.Danko (Danko) and how he returned to work from 3 months of medical leave and was asked to build a mobile app about the Galaxy's finest smugglers using technologies that he knew little about. In the first part of the story we got to know how Danko built the Java backend for the app and in this part we will explore the front-end side of things i.e. the Ionic framework powered mobile app. Background In the first part of this story, Java RESTful backend for an app about the Galaxy's finest smugglers , we learned about the new project requirements that Danko had to work with, which were For his new project, Danko was asked to build an app that that shows a list of some of the  galaxy's finest smugglers   their race when we click on them  and the user should also have the ability to add a smuggler Since this was a client project, the UI for the project was already known and the first thing that Danko had to do was ...

Java RESTful Backend for an app about the Galaxy's finest smugglers (SW)

In this post, I aim to show how to build a Java RESTful web service or a Java Restful backend that can be used(consumed) by a mobile app or a web site. Unlike my pervious posts where I explain a technical solution, I am going to structure this one differently. In this one I am going to try and tell a developer's story through it. Background Our story picks up from the time Cpt.Danko (Danko) returns to work after being away for 3 months on medical leave. At this point all we know about Danko is that before going on leave he was just a developer, all he did was write code the way he was asked to and he had very little responsibility. On returning to work, he didn't realise that he was no longer just a developer but he was actually "promoted" to a full-stack developer and had heaps(lots) more responsibility with the same old (low) wage. This "promotion" caught him by surprise as after being away for 3 months he expected to have the same level of responsi...

The story of how I decided on a change in approach after I met a content writer

Part of the reason I have not written a new blog post in over a month is because I was on a holiday and that too in a place where I did not have the best internet connection. The other part is that I am trying to make my next technical blog post more captivating than my previous posts. What prompted the initiative to write more engaging posts? During my holiday I met someone new and during the introductory phase I asked her "so what do you do?" to which she replied, "I am a content writer" and I thought, WOAH! Prior to meeting her, I had never met anyone who did that, I mean the concept of "content writer" was new to me. So as usual when presented with a new concept, I try to analyse it and think more about it. I though hmm, if there is a job dedicated to it, then content creation is something that shouldn't be ignored.  I was thinking about all this in the context of my blog and the posts I write i.e. the content I create on my blog. The conc...

Ionic app with a Django backend: Part 1 - The backend

In this post, I will be talking about my latest Github repository(repo);  IonicAppWithRestBackend  and delve into details about what it is and the problem it aims to solve. Introduction The idea of this repo is to provide code samples for both the backend and front-end for an Ionic app that communicates with a REST ful backend. The aim is to bring many disparate aspects of building a solution like this(hybrid app that talks to a REST backend) and to be able to see most of them as one complete solution. Also, a solution such as this ensures you can test your Ionic app locally during development. Still not clear? read on to find out what I mean. Note: Once I started writing this post, I realised that it would be a really long blog post, so I decided to split it into individual parts in hopes that it's an easier read. In part 1, I will be talking about what the backend solution is and how to get it running. Motivation In 2014, I started working on a project with someon...

Debugging a large, complex system(Java)

So for my main contract, I am working on a fairly large and a complex system i.e. it has many moving parts. So in addition to the large code-base that I have to maintain, the project also makes use of several libraries i.e.  jar files written by various teams of developers at a different location to where I work. However even though completely undocumented,  I do have access to the source code for most of those jar files. It is a Java based system which uses the Spring framework  and Maven , amongst other things. Problem As I mentioned this system has many moving parts and often when I have to add a new component to it, I rely on a few things from the jar files written by a team of developers far away. Every now and then, the changes made to those dependant jar files by the team of developers do not work or have some "sneaky" hard to find problems within them! so for code that I did not write, I need to find out why isn't it working? is it possible for me to f...

Making an iOS app like making a Java web app - Part 2: writing iOS apps

In part 1 , I gave a brief, very high level overview on how Java web apps are written. Ok how about a quick recap of what was covered in part 1...actually let's use some diagrams this time. Previously ... in Part 1 Java web app architecture The above diagram essentially summarises what was written in the section titled " Java web app walkthrough", so in a nutshell For a Java web app, the user interface (UI) is created via HTML/CSS/Javascript The Controllers i.e. Java code act as a communication layer between the UI and the Data store, typically a Database: what that means is that the Java code passes data to and from the UI and the Data Store(Database). The kind of Data Store that I normally work with is a  relational database , there is a reason I have mentioned the type of database, read on to find out why. Refer to Part 1 for a more detailed walkthrough of a real-world example of using a registration form Now how can we apply the above approach to w...

How does the browser's native login prompt work and how to use it programmatically

This is another one of those rather interesting problems that I had to solve at my day job and since I knew little about how to solve it when I first came across it, I am going to blog about it. I am sure there are others like me, who may not know how to solve it when tasked with such a problem. Problem So I am working on a Java based project at work(lets call it Project X )  for which my latest task was to change the way it handles login. Problem details I think it's best I provide some context before I describe my problem, so here we go, You see when you try to access a certain restricted area of a web-app when not logged-in the browser will show you a login prompt, and only when you enter the right credentials, will you be able to access that area of a web-app. That entire process of seeing the login prompt, entering the credentials etc requires human intervention and my task was to achieve all that programmatically i.e. without any human intervention for Project...

Java servlet to work as a proxy for html2canvas

So I wrote about how I used the html2canvas to solve one of the problems at work in this post . Now have a read of the  documentation  for html2canvas, and focus on the bit about same origin content. So in summary, if the web page you are trying to capture the screenshot of, contains an image that comes from a different domain, that image wont be in the screenshot that you just captured with the library. So the only way to ensure cross origin content is included in the screenshot is via a proxy. Now the author of html2canvas, has provided proxies, for Python  and Node.js , but they are not of use to me as I was using the html2canvas in a Java project. So I had to write my own little Java servlet to get the job done. So it was a very simple servlet and I was just surprised that there wasn't a Java based proxy out there. Anyway so the servlet that I had to write to work as a proxy was something similar to what I have shared in this Github repo . I am sure you realise t...

Fun with Recursion: back to basics.

I am currently working on solving a problem that is about trees, lots and lots of them. Looking at this problem, the first thing I realised was that, while I can solve this problem using stacks, this is really a problem for which a recursive solution is a natural fit. Recursive problem solving is something that I have quite lost the hang of in recent years, using only iteration on a day to day basis. Hence I decided to go about rectifying it and learning what is essentially early uni years stuff. This is harder than it sounds, not because of the problem itself but because of how "dumb" I felt, given that this is really something that I should be naturally good at. Now once I got over my emotional issues and hours of self loathing, I actually had a strategy of how I can get better at recursion. The strategy was simple, forget about my work experience, the education, the scientific publications etc etc, all in all swallow my pride and start from...