Category Archives: Default

Getting started with Amazon UAM

Amazon has launched a new product in Web Advertising segment,  it’s – Unified Ad Marketplace (UAM). It aims to cater web publishers who want to take advantage of header bidding technology but do not have time or expertise to make a switch from traditional waterfall setup to managing header bidding partners on their own.

List of Ad networks and exchanges who display ads through UAM –

  • Amazon
  • Rubicon Project
  • OpenX
  • PubMatic
  • AppNexus
  • ad:tech
  • district m
  • RhythmOne

With UAM, all you need is an active DFP account (with primary currency must be either USD, CAD, EUR, GBP, JPY, or INR) and you’re good to go. If you already have an invite or Amazon Associates account you can login here : https://ams.amazon.com/webpublisher and continue or submit the application for your website.

DFP Set up

Google DFP setup is fairly simple because UAM has automated line item setup for you.  You just need to follow the UAM guidelines –

  1. Allow DFP Account access – to push line items for you
  2. Enable API access and push line items

Website Setup

There are many ways to integrate UAM with your existing ad setup. But I’m going with the simplest approach where you integrate UAM standalone and other line items from your DFP would compete/deliver when UAM does not beat the RPM from your existing ad partner (e.g AdX or Adsense). You need to update ads.txt for UAM (available in UAM dashboard) before you start serving ads.

Here is a sample code from one of my website. This one needs to be implemented in head section.

And here is the corresponding ad unit that needs to be included on the page, where the ad would be displayed.

Result : It has improved overall ad revenue by around 20% for one of my website. Earlier I was using just Adsense for monetization. That website doesn’t not have enough traffic for a complicated header bidding setup, but with UAM it’s fairly easy to do so. If you go ahead with UAM, consider sharing your results in the comments.

Note : And by the way, I’ve updated my blog after a really long time :-). I’ve been busy with my other web projects (mostly niche applications) and recently a social project I started in my village (North Bihar, India) to raise awareness on air pollution and so. If you want to know more, read here : https://samyakfoundation.org

What is UUID or Universally Unique Identifier ?

UUID (universally unique identifier) is a 128 bit identifier value used in Software construction for uniquely indentifying some object or entity which doesn’t require central registration process.

Sometimes it is also referred as GUID ( Globally Unique Identifier). In canonical form for human readibility, it is represented by 36 character (32 alphanumberic character and 4 huphens). For example :

dd233d16-be05-11e6-b8fe-0401beb96201

According to RFC 4122 ( RFC is formal document from IETF – Internet Engineering Task Force), UUID can guarantee uniqueness across space and time. The chance of two UUID to become same is extremely low. Suppose if a machine generates one billion UUID every second for next 100 years, the probability of creating just one duplicate would be about 50%. Which in practical sense, makes two UUIDs very unique but not in theoratical sense.

Application of UUID

UUIDs are useful in many places such as identifiers for documents, hosts, application clients and other situation where a unique value is necessary like transaction IDs.

UUIDs were originally used in the Apollo Network Computing System and later in the Open Software Foundation’s (OSF) Distributed Computing Environment (DCE), and then in Microsoft Windows platform.

UUID Verisons

UUID has 5 variants. Each version takes different source of information to generate the UUID and are meant for specific purpose. For instance, Version 1 UUIDs takes date-time and MAC address, Version 2 UUIDs are generated from group or user id and date-time, Version 3 & 5 produces deterministic UUIDs generated from a user-specified namespace and user-supplied data, and Version 4 is randomly generated.

Generating a UUID in Python

import uuid
print uuid.uuid1()
print uuid.uuid4()
print uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
print uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')

References : https://tools.ietf.org/html/rfc4122.html

Note : This is a guest post by Ambuj Kumar. Recently, he also made an online tool that generates UUID for verion 1 and version 4 online : https://uuidgenerator.org/

Notes – a simple note taking app for Ubuntu/Linux

Notes is a simple and minimalistic note-taking application. It’s a free and open source cross platform app. It offers a simple writing pad for entering plain text, without any style. It can be used for anything – writing short notes, poems, todo list, ideas or long articles/essays etc.

notes screenshot

Notes is build using Qt framework (an open source cross-platform toolkit), inspired by the default notes app from Mac OS X (Yosemite). Although, I find the Mac like icons (minimize, close, maximize) little odd as it doesn’t look blended with XFCE desktop, but I like the simplicity and elegancy of app.

Installing Notes in Ubuntu

In Ubuntu 16.04 LTS, it’s already available in official repository. you can install it from the Ubuntu Software Center.

For older version (e.g Ubuntu 14.04 LTS) or other Debian derivatives such as Linux Mint, first download the debian package and install it using Ubuntu software Centre or GDebi package installer.

Also check out the github page if you want to follow the updates on new features or report any bug etc. Let me know (comment below) your feedback if you use this app for taking notes.

Check for open ports using this free tool : Port Checker

Few weeks ago I created a tool : port checker – that checks for open ports. It’s a simple web app built using Sinatra (a lightweight framework in ruby) and Foundation (an advanced front end framework), over a weekend.

port-checker-tool

http://portchecker.co

More about this little web app

It simply checks for open ports on your computer (useful in testing port forwarding setup or security reasons obviously). You need to specify the port number and IP Address (optional, it selects the origin IP by default, so it’s not required unless you want to scan for other device or server IP). Then it tells you whether the port is open or closed.

Later I also added a port scanner, so it can scan for some common ports (~20) in a single click. (However it restricts the IP address to origin to prevent any misuse)

Features

  • simple and easy to use
  • mobile friendly design (thanks to the Foundation framework)
  • online port scanner (I may add some other features like port range scan or so, based on the suggestions on HN)

Note : It’s a web app intended for casual use. If you need a more comprehensive tool for scanning ports or security audits, then you should check out Nmap (or Zenmap if you prefer to use graphical interface over the command line), a free and open source tool for network scanning.

PS If you find the tool useful or have any suggestion/feedback, let me know via comments.

uml-class-diagram

GenMyModel: Online UML Tool for software architects and developers

Innovative UML Tool

After 3 years of research and development, GenMyModel draws the future of software modeling. GenMyModel is a free browser-hosted UML tool for developers and software architects. Its main force: create UML-compliant models online and generate code.

Unlike the well-known desktop alternatives, it allows you to work on any web browser and from any computer with any OS (Windows, Linux, MacOS). GenMyModel has been released in beta in 2013.

It supports for now class and use case diagrams and works with GitHub to host the generated code.

Try GenMyModel by following this link: UML Online Tool

Online UML tool

GenMyModel is free

Log in (free) & create an UML project

First thing you see is the connection window where you can sign in with your Google account or sign up with another email address.

GenMyModel dashboard

Once you are logged in, you discover your dashboard where you have the choice to create a new project or use one of the existing templates below. When you create a new project, you can then set a title and choose between a public or private project. When you open a project, a new tab appears above for you to easily switch between your class and use case diagrams.

Public uml online

Class diagram and use case diagram

When you create a new project, it instantly opens a tab for class diagrams, but you can choose in the “File” menu to make new use case diagrams.

The vertical toolbar between your whiteboard and the project explorer shows you the different tools to create classes, interfaces, add attributes, make associations and more. For example, if you select the class tool or press ‘C’ (the underlined letters being keyboard shortcuts), you can place a class anywhere on your whiteboard. You can also add several elements at a time by holding ‘Ctrl’

class diagram online

You can then select one or more elements and move them on your whiteboard, rearrange links or set a few properties. Same thing goes for use case diagrams.

Change the model properties

The bottom-left corner of the application groups all the properties you need for the elements you selected. This way, this small window allows you to set names, types, visibility, multiplicity, comments and a few other settings.

UML Online property

Those possibilities change according to your selection on your whiteboard or the project explorer.

Code generators

Generate Java and SQL online

GenMyModel provides code generators:

  • Java Beans
  • JPA Beans
  • Spring Data REST application
  • Spring Roo
  • SQL

There are two ways to generate code: with the ‘Tools’ menu or by right-clicking on your model. You can then choose between a direct generation creating a ZIP file with Java, Java JPA or SQL code, or configuring your own saved configuration allowing you to push to your GitHub repositories.

UML code generator

Push to GitHub

If you are a GitHub user, you can push your generated code to the hosting service. In the code generation configuration window, you just have to type your repository URL and the branch you would like to send your code to. The first push can take a while but it is quite fast afterwards.

UML Java code generator

Export image and XMI

GenMyModel allows you to export you models to image files in JPEG or SVG, or export to XMI. You can choose either format by right-clicking or with the ‘Tools’ menu.

Export documentation to PDF

You can also export the documentation of your models to a PDF file. Resulting in a document with images of your diagrams and the list of every element and its properties.

Share by email

Sharing to social network is planned for the next few months, in the meantime you can share your work by email with the same menu.

Web description for public projects

When creating a project within GenMyModel, you can choose between the public and private options. Private means only you can see and modify the model. Public means you are the only one allowed to modify it but anyone can fork it.

Web pages are automatically created for public projects so that you can share and show what you design. Examples: Class Diagram University Management System

Roadmap

The next major release before october 2013 will include:

  • Real-time collaboration
  • Java Reverse engineering
  • Package support for class diagrams and use case diagrams

Technology

GenMyModel is built upon Javascript and HTML5.