Skip to main content

Posts

Showing posts with the label Programming

What I Learned In 2017 : Technology and tools I learned as part of my code therapy

Taken from the internet T he year 2017 ended in the usual festive way. It is, therefore, just standard for us to be retrospective of the year that was and look forward to new plans for 2018. Personally, last year was life-changing. Bleak at it may seem, I managed to look at the lighter side of things. I literally stayed at home the whole year recuperating from a health issue. Instead of stumbling into depression, I resorted to code-therapy! From mid-2017, I shifted from full-time desktop developer to a wannabe web developer. It was fun, like being handed with a new toy to play around. Here is my alphabet listing of what got me interested and always looking positive last year. Angular I once have the desire to learn Angular late 2015, when it was still referred to as AngularJS. Because of work schedules and other priorities, it was buried from my bucket list. Last year was different, I had time. I started with Angular 2.0 and due to the fast releases from Google, my last ...

MessageBox : Just Another Custom Alert Implementation for Angular

D ialog boxes never peeked my interest in my previous limited web development side projects, the fact that I have never seen the use of it is one reason and there is always the reliable call to Alert, which does the job that I require. Bootstrap's modal boxes are interesting but did not have time to really dive into it. Then came a chance to learn Angular. I have been playing with Angular and Angular Material for almost 2 months. Just last month, they literally broke me by breaking some of my codes with its latest release. Don't start mentioning flex, can't seem to wrap my head around it. But there's just this thing about these framework that you love and hate. For one, it's implementation of Angular Material Dialog Boxes is easy to understand. Source : Internet I had years of work relying on Windows Message Boxes for alerting just about anything. A simple call and easy to get results. string message = "Do you want to abort this operation?" ; s...

Get Started with MongoDB Stitch : The New Backend As Service Offering from MongoDB

Source : Internet H alfway of this year, the guys from MongoDB launch their new backend as service product called MongoDB Stitch. While the launch is just for the beta, the promise of the service is quite interesting. MongoDB has been around for long now and some development stacks have been based on its database product, the MongoDB-ExpressJS-Angular-NodeJS (MEAN) and the MongoDB-ExpressJS-React-NodeJS (MERN) stacks to name a few. These stacks, however, relies on backend technology such as ExpressJS and NodeJS . The idea of provisioning servers and developing the backend solution makes it daunting for small to medium scale applications. MongoDB Atlas , at least made life much easier by providing on cloud database solution, but there must be a simpler solution, right? A solution the would stitch the backend and frontend together ( see what I did there ?). Source : MongoDB Presentation MongoDB Stitch lets developers focus on building applications rather than on managing data...

Good Old HTTP Test on Windows with VBScript

D eploying a Point-Of-Sale system on a large store with existing security protocols is not a walk in the park. Processes that can be easily done in a test environment can be prohibitive in the actual production setup. ( TL;DR Scroll further down for the script) Scenario You are implementing a new electronic payment system in store ABC. Hardware replacement went well, installation went well, then its time to test. That easy, just run a few transactions and you will be out of the site in no time. Then it hits, the PINPad system had an issue downloading the configuration file from the server across the internet. The device routes its request to the POS so it will be easy testing the connection. The lengthy documentation tells you to just send a get request to a URL address in the Internet Explorer. Great! What Windows machine doesn't have IE? None you know of! But the system administrator is wise enough to disable it, avoiding possible vulnerabilities that might jeopardize their ...

Getting Started with Stateless : A Lightweight Workflow Library Alternative for .NET

Image Credit: https://www.pioneerrx.com A year ago, I was looking for a simple workflow manager for a project I was working. Its a medium sized application that involves tracking the state of assets in the system. Back in 2008, Microsoft (MS) introduced new technologies along with the release of Visual Studio 2008: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and  Windows Workflow Foundation (WF). Having worked in a company utilizing mostly MS products for development, my first option was to go with WF. After doing some time reading and studying the library, I paused and decided it was too complex for my requirement. Using WF would be an overkill and the fact that it has, a rather, steep learning curve, there has to be another option. My mind toyed with the idea of developing a simple workflow library myself. It would be a learning experience but it might end up consuming a lot of time. Why reinvent the wheel? So I started querying the ...

Integrating GitHub on Visual Studio 2017 : Your First Repo, Commit, Push, and Pull

Lets get started publishing our VS2017 code to GitHub. If  your IDE is not yet configured to use GitHub, read this article as a starter.  There are two ways to start contributing to the open source community via GitHub : clone or fork  an existing repository and start contributing and publish a new repo on GitHub. Creating a New Repository in GitHub Create a new blank solution.  Make sure the Create New Git Repository option is checked.Once created, this will only reside on your local machine until we publish it online.  Go ahead and add a simple console app and test before start committing.  Note that VS2017 will automatically add a  .gitignore file for the project.   The Team Explorer pane should be displaying the new repo on the Local Repositories section. Double click on the repo to access the available actions.   Changes - Use this to view code changes you have made in the project. Sync - Use these to initiate syncing between re...

Integrating GitHub on Visual Studio 2017 : Getting Started

For developers working on personal open source projects, GitHub has become the choice repository.  Sure we do love the geekiness of doing all our git related actions on the terminal ( command prompt for Windows ), but for productivity and efficiency, other developers would prefer an intuitive UI to save them from typing lengthy git commands. Luckily, there is a GitHub desktop app available for this. Yet, we developers, some times doesn't want to go out of our favorite IDE just to do a simple commit or pull while our mind is engaged on cranking the code that will save the world. Good thing, our friends are Microsoft are generous enough providing third party developers to create extensions or add-ins for their beloved Visual Studio. GitHub, thus, gave us a GitHub extension that can be integrated to Visual Studio 2017. The extension does not offer us out of this world features, just a way to do the git processes within Visual Studio. The good thing about it is it integrates seamlessl...

Hiding Unwanted Python Folders and Files in Visual Studio Code

Visual Studio Code is a universal editor and pretty good at it. However, the explorer view maybe cluttered with the automatically generated folders and files confusing developers. Python is no different. Below are example files and folders generated by Python. The __pycache__ folder and *.pyc files  are totally unnecessary to the developer. To hide these files from the explorer view, we need to edit the settings.json for VSCode. Add the folder and the files as shown below: Copy and paste the lines below : "**/*.pyc" : { "when" : "$(basename).py" }, "**/__pycache__" : true

Hiding JS and Related Files While Working with TypeScript : Visual Studio Code

While I was exploring Angular 2 , following their Tour of Heroes tutorial, I was excited to see it is using TypeScript . As we know, TypeScript is not directly supported by browsers. It has to be transpiled into JS code for it to work. Good thing, the guys at Google has come up with a startup kit when developing Angular application ( instruction how to get it here ). Now you dont have to worry about manually transpiling TypeScript codes to JS, the package will do that for you and a lot more ( BrowserSync , yeah). With that being taken care of, you only have to worry about your TS code. Because the transpiled files reside on the same folder, these files may cloud up your Visual Studio Code file list. I asked StackOverflow ( Google for devs haha ) and got a working solution, pronto!

Unit Testing in Python : A Primer

Automated unit testing has been around for more than a decade now. I remember back in 2008, a colleague introduced to our team the concept of MVP pattern and in the process the advantage of using the pattern in unit testing. The concept of automated testing using NUnit and mocking using NMock was also discussed. That is where I began to see the advantage of implementing Test Driven Development  methodology to developers. Unfortunately, the company where I moved don't see it as such. Thus, I was only able to practice it on my learning time. With the recent events in my life , I now have more time exploring this concept a little further. A series of post will concentrate on this concept using Python and C#. Lets begin with Python .

Enabling Intellisense for AngularJS in Visual Studio Code

Visual Studio Code is a feature-rich code editor developed by Microsoft. Extensions can be added to the application to make it more usable. Intellisense is a developer feature that is present n almost all modern code editors and VSCode supports it. However, it does not support it out of the box. Follow the steps below to install Angular intellisense on VSCode Windows. Prerequisites: NodeJS  to be able to install the needed packages through npm .  Visual Studio Code.

How to Kill a Slow Process using DOS Batch File Script with TaskKill and TaskList

If you are still trapped in the era of batch files and command lines in Windows environment, here is something you can add to your DOS cheat codes.  Lucky for us here, we are still using DOS batch file to implement installation of some updates to our system. Here is a simple batch file script that is designed for slow systems that requires a significant amount of time to kill a particular process. The requirement is simple,  do not start any copying or moving of files until  the process ( i.e. MyProcess.exe) is totally killed by DOS. The simplest solution would be to use TASKKILL to kill the process, wait for a few seconds  then start copying/ moving of files there after. Unfortunately, while we were testing this simple step on a slow machine, DOS would take an awful lot of minutes to kill the process in question. Thus, when our delay is reached, we would encounter error on copying/moving files that is currently used by the unkilled process causing a failure on ...

Visual Studio 2012 Update 2 is Now Available!

Good news to all Microsoft Visual Studio users,  MSDN has sent email notifications to all subscribers about the availability of update 2 today. Here is the rest of the information from the email.

"Login failed for user ''. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)"

Microsoft error messages are sometimes cryptic and in some cases, misleading. This morning I was working on a client server setup at work when I encountered one. So I have two fresh image drive, one for the client and the other for the server. For redundancy, each have their own MS SQL Server installed. The client uses its local database in case of disconnect. After a little configuration, all is almost ready to go. However, final test would reveal its not ready at all.