<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Algorithm Of Life on Medium]]></title>
        <description><![CDATA[Stories by Algorithm Of Life on Medium]]></description>
        <link>https://medium.com/@balaajip?source=rss-258239145710------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ca-rBuQUmNUV7sdfiti3ww.jpeg</url>
            <title>Stories by Algorithm Of Life on Medium</title>
            <link>https://medium.com/@balaajip?source=rss-258239145710------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:33:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@balaajip/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Prompt Engineering 101]]></title>
            <link>https://medium.com/@balaajip/prompt-engineering-101-189ccd5b8f0e?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/189ccd5b8f0e</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 03:22:40 GMT</pubDate>
            <atom:updated>2025-10-08T03:22:40.544Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence (AI) has emerged as the most discussed technological advancement in the past two years, particularly following the launch of ChatGPT. This surge in interest has highlighted the need for effective AI interaction strategies and understanding of communication methods with these sophisticated systems. The foundation of AI communication lies in the concept of prompts — the initial input that the system processes to generate responses. These interactions aren’t merely casual conversations but require careful consideration of structure, clarity, and context to achieve optimal results.</p><p>Prompt Engineering has evolved as a specialized practice of crafting specific and well-structured inputs to generative AI tools, extending beyond text to include images, videos, sound, and code. Unlike human thinking patterns, AI operates through sophisticated pattern matching based on its training data, analyzing words and patterns against its vast dataset to generate relevant responses. The effectiveness of AI communication heavily depends on how we structure our prompts, as AI systems don’t inherently understand context the way humans do, making the ability to craft effective prompts an essential skill in our increasingly AI-driven world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*kdDVsufwVVqm-MvtMbvY1g.jpeg" /></figure><p>Before we jump into the details of how to structure a prompt we need to understand a few important concept</p><p><strong>Large Language Model (LLM):</strong><br>Large Language Models are advanced artificial intelligence systems trained on vast amounts of data, capable of understanding human language in sophisticated ways. These models, which include prominent examples like GPT (Generative Pre-trained Transformer), operate by processing input text through complex neural networks. Through extensive training on diverse sources, they learn patterns in language that enable them to perform tasks ranging from simple text completion to complex reasoning and analysis.</p><p><strong>Hallucination</strong><br>Large Language Models (LLMs) has been fed with a whole lot of data from the internet and doesnt necessarily happen to have the context for the provided prompt as a results they hallucinate.</p><p>Hallucination, is when a tool provides outputs that are inconsistent, incorrect or even nonsensical<br>For instance the most popular one when you ask AI</p><blockquote><em>How many Rs in strawberries<br>The word “strawberries” has two Rs: stRawbeRRies</em></blockquote><p>So its important to always verify the answer every time when accuracy is required on use better prompting techniques to minimize hallucination.</p><p><strong>Zero-Shot Prompting:</strong><br>This kind of prompting is a straightforward technique where AI models perform tasks without requiring examples or prior demonstrations. Unlike other prompting methods, this approach relies solely on the model’s existing knowledge and understanding to generate responses from direct instructions.</p><blockquote><em>1. Add 2+5<br>2. Translate to Spanish: “Hello World”</em></blockquote><p><strong>One-Shot Prompting:</strong><br>One-shot prompting is a technique where you provide the AI model with a single example before asking it to perform a similar task.</p><blockquote><em>English: Cat → Spanish: Gato<br>Translate Dog</em></blockquote><p><strong>Few Shot Prompting:</strong><br>Few-shot prompting involves providing the AI with two or more examples of how to complete a task before presenting the actual problem to solve. This method is like teaching by demonstration, where each example helps the model understand the pattern and expected format of responses. For instance, when working with translations, you might show several English-to-Spanish word pairs before requesting a new translation.</p><p>Try prompting the below and observe response</p><blockquote><em>Example 1: Review: “This movie was absolutely brilliant! Great acting and amazing storyline.” Sentiment: Positive <br>Example 2: Review: “Waste of time and money. Terrible plot and boring characters.” Sentiment: Negative <br>Example 3: Review: “The visuals were stunning, but the story made no sense at all.” Sentiment: Negative <br>Now classify this: Review: “The performances were outstanding and I was on the edge of my seat!” Sentiment: [Your answer here]</em></blockquote><p>Now that we have got some basic concepts out of the way, lets dive deep on prompt engineering.</p><p><strong>Methods of Prompt Engineering:</strong><br>The most common approaches to prompt engineering include,<br>1) <strong>RAG (Retrieval-Augmented Generation)</strong> enhances AI responses by incorporating relevant external knowledge or documents into the generation process. LLM are based on internet data and not on specific domain or current affairs. When querying LLM and needing to bring company specific or domain specific model RAG technique helps in bringing the context as input. Google Search and Perplexity are real good implementation of RAG mechanism and they are fine tuned for accuracy. The question is first checked against a retriever which is the internal knowledge base and this context is attached as a prompt to LLM to obtain the desired answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*NO6bGT0V9xykj-KKndhUow.png" /></figure><p>Now we know what RAG is, lets try it out. Try the below prompt across various platforms and check the results.</p><blockquote><em>Which is the country with the most medals in 2024 olympics</em></blockquote><p>You will realize perplexity.ai provides better and more detailed responses than Gemini or Chat GPT which rely on direct LLM response.</p><p>2) <strong>COT (Chain of Thought)</strong> prompting encourages the AI to break down complex problems into step-by-step reasoning, similar to how humans solve problems. This is similar to explain like an 8 year old. This is to guide a LLM while requesting a bigger task and asking it to break it down into smaller tasks and arriving at the results. This way you are clear in how it arrived at the end result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*NS-JTib3fo_Iii1pCWH9vw.png" /></figure><blockquote><em>Try prompting the below scenarios and see the response<br>Calculate 4+ 5* (6*7)<br>and <br>COT Calculate 4+ 5* (6*7)</em></blockquote><p>3) <strong>ReAct (Reasoning and Acting)</strong> combines reasoning with action planning, allowing AI to think through a problem and determine appropriate actions. This prompting technique is very similar to RAG but the main difference is in RAG you take information in the private knowledge base and use that to provide context, in ReACT you can retrieve information from both public and private knowledge bases and think through the steps needed to solve a problem while explicitly showing the reasoning process and actions taken to reach the conclusion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75ux19-b1487wSv9fVu1ZQ.png" /></figure><blockquote><em>Try prompting the below scenarios and see the response</em></blockquote><blockquote><em>ReAct — What is the capital of Bosnia and calculate the distance from Austin.</em></blockquote><p>4) <strong>DSP (Directional Stimulus Prompting, Describe, Specify, Prescribe)</strong> is a structured approach where you first describe the context, specify requirements, and then prescribe the exact format or actions needed. These methods can be used individually or combined depending on the complexity of the task and desired outcome. This method allows you to get LLM a specific response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*U3A3GEOlvYep82f-XbEpXw.png" /></figure><blockquote><em>Describe: You are an AI assistant specializing in climate science. The user is a high school student working on a project about global warming.<br>Specify: Provide a concise explanation of the greenhouse effect, including its main causes and consequences. The explanation should be no longer than 150 words and suitable for a 15-year-old audience.<br>Prescribe: Use simple language, avoid jargon, and include one analogy to help illustrate the concept. Structure the response with an introductory sentence, main body, and a concluding sentence.</em></blockquote><p><strong>What should a prompt have ?</strong><br>When interacting with AI tools, providing clear context is crucial for optimal output. For Large Language Models (LLMs), comprehensive details and well-defined formats significantly improve the system’s ability to interpret and respond to queries accurately. Let’s examine how to structure an effective prompt.</p><ol><li>Define a <strong>Task</strong></li></ol><ul><li>Clearly state your objective</li><li>Example: “Identify a gift for my friend’s birthday”</li><li>Be specific: “Create a $100 gift list” vs just “suggest gifts”</li><li>Use action verbs: create, design, analyze, explain</li></ul><p>1.1 Include a <strong>Persona</strong></p><ul><li>Direct AI to assume a specific expertise</li><li>Example: “As an expert event planner with 15 years experience…”</li><li>Other examples: financial advisor, data scientist, marketing expert</li></ul><p>1.2 How do you want the <strong>Output?</strong></p><ul><li>Specify exact output structure</li><li>Example: “Present in a 3-column table with items, prices, and rationale”</li><li>Other examples: Table, bullet points, paragraphs, step-by-step guide. Include word count/length requirements</li></ul><p>2. Provide <strong>Context</strong></p><ul><li>Provide relevant background information</li><li>Example: “My friend is a 29-year-old female who loves cats and outdoor activities”</li><li>Include demographics, preferences, constraints</li><li>Add important limitations (budget, time, location)</li></ul><p>3. Attach previous <strong>References</strong></p><ul><li>Share previous examples or experiences</li><li>Include specific scenarios that worked well</li><li>Example: “Last birthday she enjoyed having a beach party”</li></ul><p>Most importantly, understanding that AI systems operate differently from human thinking patterns is essential. By following structured prompt engineering techniques and being mindful of potential hallucinations, users can significantly improve their interactions with AI systems and obtain more accurate, relevant, and useful responses.<br>As AI technology continues to evolve, mastering these prompt engineering techniques will become increasingly valuable for effective AI communication and problem-solving.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=189ccd5b8f0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Level Up Your Tech Career: An IC’s Guide to Growth]]></title>
            <link>https://medium.com/@balaajip/level-up-your-tech-career-an-ics-guide-to-growth-9651268f05d2?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/9651268f05d2</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[career-growth]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 22:36:27 GMT</pubDate>
            <atom:updated>2025-06-19T13:32:26.951Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*vz4CSQ-xumyMgGB1qJeaJw.jpeg" /></figure><p>Having navigated my own career journey and helped numerous individuals succeed in their paths, I’d love to share some insights about career progression in your current workplace. It’s important to acknowledge that career growth is a journey that requires patience, dedication, and perseverance — it’s not something that happens overnight.<br>The foundation of career growth often follows a simple but powerful pattern: Learn, Own, Deliver, and Repeat. This might sound straightforward, but let me share my personal experience to illustrate this journey.</p><p>Like many soft spoken engineers, I’ve started my career being more inclined towards focused work, preferring to speak when I had something meaningful to contribute. I have focussed my energy into honing my craft as a programmer. I dedicated myself to gaining a deep understanding of the software I worked on and mastering the associated technologies, which enabled me to consistently deliver high-quality results.</p><p>Through consistently repeating this process of learning, taking ownership, and delivering results, I gradually became a trusted subject matter expert. This enabled me to venture into new, unfamiliar territories with confidence. Over time, team members began seeking my guidance on both business cases and technical implementations. This natural progression is an indication that the team is starting to look at you as a leader and opens up opportunities for you to step up, define standards, and contribute to areas outside of your immediate responsibility, such as contributing to design reviews, actively reviewing the team’s code, and providing good and constructive feedback. Promotion usually happens after you have consistently exhibited behavior expected at your next role and not the other way around.<br>Remember, everyone’s journey is unique, and it’s essential not to rush the process or compare yourself to others. We all have different strengths and areas for growth. Focus on:</p><ol><li>Building open communication with your manager</li><li>Actively seeking and embracing feedback</li><li>Conducting regular self-assessment</li><li>Creating actionable plans to address growth areas</li><li>Be visible and be explicit to share your achievements</li></ol><p>Sometimes, you might wonder why others are getting promoted while you’re not. The answer often lies in the feedback you receive and how effectively you act on it. Maintaining an open, honest relationship with your manager is crucial. Regular feedback sessions help identify gaps and create opportunities for growth.<br> Most importantly, approach feedback with an open mind and a willingness to learn. Your receptiveness to feedback and commitment to personal growth are vital elements of career success.</p><p>I also recommend gradually emerging from being soft-spoken and finding avenues to showcase your abilities. This can take different forms, such as being present and contributing to organization-level design reviews, sending emails about accomplishments, or leading and contributing to knowledge-sharing sessions. Find your preferred avenue to be visible to skip-level leaders, focusing on areas where you excel.<br> Remember, your career journey is your own. Embrace the process, celebrate small wins, and stay focused on continuous improvement. With dedication and the right mindset, you’ll find your path to success as an IC.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9651268f05d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to succeed in a job interview?]]></title>
            <link>https://medium.com/@balaajip/how-to-succeed-in-a-job-interview-8b652b898573?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b652b898573</guid>
            <category><![CDATA[interviewing-tips]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[job-search]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Wed, 12 Sep 2018 14:40:24 GMT</pubDate>
            <atom:updated>2018-09-13T17:18:29.973Z</atom:updated>
            <content:encoded><![CDATA[<p>If your are here, there is high chance that you are working to make your next big move or you are unsatisfied with your current job. In either case, I would like to share my inputs which I had collected during the years by going through the process myself or by interviewing several candidates and what I look out from them. Lets go over the most important things you need to take care off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtK-PFluDvYeIgCyso1Gcg.png" /></figure><p><strong>Resume</strong></p><p>Resume, the very first starting point for your search. Get your resume prepared. Take time to do this and keep improving it with every job interview and identify areas that are missing. Don’t stick to one size fits all. As the resume needs to be short and crisp you cannot obviously have long stories of everything you achieved. Based on the job requirements, tweak the resume in such a way that you highlight the most important things. Keep the resume to 2 -2.5pages max and not more than that as nobody is anyway going to read through it completely. Sometimes the resume is handed over to the interviewer just few minutes before the interview due to tight schedules and availability constraints so, they would not have time to read the entire resume but rather just skim through it for important key words and hope to understand better during the interview.</p><p><strong>LinkedIn</strong></p><p>Keep your linked in updated with all the greatest things you have done in your career. There is no limitation as to how much you need to fill in here. Be elaborative and add as much content as you can. Treat linked as your extension of your resume. If resume is your home address, linked is walking into your home and looking at all the amazing paintings and decorations you have in your home. Also, don’t forget to turn on the setting for being viewed by recruiters on their searches. You would get most of your opportunities through linked in anyway, so it is important that you are searchable.</p><p><strong>Referral</strong></p><p>Most companies uses bots these days to filter the resume and its unlikely to land with an interview by just posting on the companies website. Move your resume through recruiters, your ex-colleagues and friends. There is high chance you will get a really quick call from the recruiter of the hiring company when it is a referral.</p><p><strong>Research</strong></p><p>Do your research about the company you are interviewing for. Understand where the company is currently investing on, their challenges, competitors and if its a public company look for their earnings call, understand their growth potential and what is the wall streets expectation. Researching on the person who is interviewing is also important. See what they have accomplished and what you share with them and answer the questions catering to their specialization. This will spin up good discussions and you get the involvement of the interviewer.</p><p><strong>Tell me about yourself</strong></p><p>I know. This could be boring because you would have answered this a million times, but still, you need to get this right. Write it down, spend time in tuning it and make sure it has the punch and all the needed elements you want the interviewer to focus on. Answering this question right becomes very important as most of the discussions are going to spawn from here.</p><p><strong>Ask Questions</strong></p><p>Yes. Ask questions. It is very important to ask really good questions and not stick to standard templates like how is the culture, how is the work life balance. This gives you a good opportunity to let the interviewer know that you have taken it seriously and invested time to do your research and helps you to end the interview with a positive note. This also, helps you to have a good discussion and aids in educating yourself about the place you would like to work in. During an interview its not just you being evaluated, you need to evaluate the hiring manager and the company and understand if this is place you would like to work for.</p><p>All the very best on your job search, hope this article would be helpful for you to strike gold.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b652b898573" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build your own OCR(Optical Character Recognition) for free]]></title>
            <link>https://medium.com/@balaajip/optical-character-recognition-99aba2dad314?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/99aba2dad314</guid>
            <category><![CDATA[tesseract]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[leptonica]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 17:08:23 GMT</pubDate>
            <atom:updated>2018-03-28T04:09:23.647Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Optical Character Recognition</strong>, or OCR is a technology that enables you to convert different types of documents, such as scanned paper documents, PDF files or images captured by a digital camera into editable and searchable data. It converts these documents into machine coded text.</p><p>OCR has been gaining recent popularity and being able to identify what is present in the image opens up a new horizon of opportunities.</p><p>For the past few years OCR frameworks has evolved a lot but not to an extent where they could be 100% for any image size or any image quality.</p><p>In order to get it more closer to 100%, requires a lot of tuning and training. There is a lot of pre-processing work involved before the most accurate information could be retrieved.</p><p>There are many softwares/APIs available out there which could be do a pretty good job of processing an image and based on what they could do and how well they do the prices vary.</p><p>Let us go over some of these in detail.</p><p>OCR has been gaining recent popularity and being able to identify what is present in the image opens up a new horizon of opportunities.</p><p>For the past few years OCR frameworks has evolved a lot but not to an extent where they could be 100% for any image size or any image quality.</p><p>In order to get it more closer to 100%, requires a lot of tuning and training. There is a lot of pre-processing work involved before the most accurate information could be retrieved.</p><p>There are many softwares/APIs available out there which could be do a pretty good job of processing an image and based on what they could do and how well they do the prices vary.</p><p>Let us go over some of these in detail.</p><h3>Some popular OCR APIs</h3><p><strong>Google vision api(</strong><a href="https://cloud.google.com/vision/">https://cloud.google.com/vision/</a><strong>)</strong> is one of the most popular API’s available and it gets you the most accurate information. Vision API is more of an image processing framework than just an optical character recognition framework. If the intention is to just identify what characters are present in the image, this framework has a lot more to it. This framework is really expensive unless your base set of images are a few.</p><p>Below is the pricing information.</p><p><a href="https://cloud.google.com/vision/pricing">https://cloud.google.com/vision/pricing</a></p><p><strong>Amazon Rekognition</strong>(<a href="https://aws.amazon.com/rekognition/">https://aws.amazon.com/rekognition/</a>) is again an image processing framework just like the Google’s Vision API.This framework uses deep learning technology to identify objects, image and faces. This is little less expensive than Vision API.</p><p>Below is the pricing information.</p><p><a href="https://aws.amazon.com/rekognition/pricing/">https://aws.amazon.com/rekognition/pricing/</a></p><p><strong>OCR Space</strong>(<a href="https://ocr.space/">https://ocr.space/</a>) is a more of a budget friendly option compared to the first 2 options. This SDK does a neat job of getting the needed information but not to the level of Rekognition and Vision APIs. If your requirement is less than 25K request a month you can even get away for free.</p><p>Below is the pricing information.</p><p><a href="https://ocr.space/ocrapi">https://ocr.space/ocrapi</a></p><h3>Open Source Frameworks:</h3><p>There are a couple of open source frameworks that can be used to build an OCR framework in house. They are effective too as long as you know how to train it for your requirements. Listed below are a couple of such frameworks.</p><p><strong>Python pyocr</strong></p><p>PyOCR(<a href="https://github.com/jflesch/pyocr">https://github.com/jflesch/pyocr</a>) is an optical character recognition (OCR) tool wrapper for python. That is, it helps using OCR tools from a Python program.It has been tested only on GNU/Linux systems. It should also work on similar systems (*BSD, etc). It may or may not work on Windows, MacOSX, etc.</p><p>PyOCR can be used as a wrapper for google’s <a href="http://code.google.com/p/tesseract-ocr/">Tesseract-OCR</a> or Cuneiform. It can read all image types supported by <a href="https://github.com/python-imaging/Pillow">Pillow</a>, including jpeg, png, gif, bmp, tiff, and others. It also support bounding box data.</p><p><strong>Tesseract-OCR</strong></p><p>Tesseract is an optical character recognition engine for various operating systems.It is free software released under the Apache License, Version 2.0, and was originally developed at Hewlett-Packard Laboratories Bristol and at Hewlett-Packard Co, Greeley Colorado between 1985 and 1994, with some more changes made in 1996 to port to Windows, and some C++izing in 1998. In 2005 Tesseract was open sourced by HP. It was later developed and sponsored by Google since 2006. Tesseract is considered as one of the most accurate open-source OCR engines currently available.</p><p>There were not many open source options for being able to build on your own. In this document, we will be do a deep dive into the Tesseract framework and how to have it setup and how good or bad would the outcomes be.</p><p>Most OCR frameworks out there is probably built on top of Tesseract and it is the most popular among the bunch which has pretty good outcomes.</p><p>Tesseract supports a whole slew of languages like no other framework. It supports English, Spanish, Thai all the way upto Tamil, Uzbec and Yiddish. It will be hard to find something that is not supported.</p><p><strong>Overview</strong></p><p><strong>OCR Process Flow</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iFK6nUOD9xCToOyVu48Phw.png" /></figure><p><strong>Machine Level Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*u6KVeyMxOFrobfc3ynzt6Q.png" /></figure><h3>How to setup and get it to work?</h3><p>For this exercise I use a Dockerized Java Spring — boot application with a Gradle build.</p><p>Gradle dependency needs to be added for Tesseract, Leptonica, JMagick and Im4Java. Lets discuss in a few on what are these</p><ul><li><strong>Gradle dependency</strong></li></ul><blockquote>dependencies {</blockquote><blockquote>compile group: &#39;org.bytedeco.javacpp-presets&#39;, name: &#39;tesseract&#39;, version: &#39;3.03-rc1-1.0&#39;</blockquote><blockquote>compile group: &#39;org.bytedeco.javacpp-presets&#39;, name: &#39;tesseract&#39;, version: &#39;3.03-rc1-1.0&#39;, classifier: opencvBinaryClassifer</blockquote><blockquote>compile group: &#39;org.bytedeco.javacpp-presets&#39;, name: &#39;leptonica&#39;, version: &#39;1.72-1.0&#39;, classifier: opencvBinaryClassifer</blockquote><blockquote>compile group: &#39;jmagick&#39;, name: &#39;jmagick&#39;, version: &#39;6.6.9&#39;</blockquote><blockquote>compile group: &#39;org.im4java&#39;, name: &#39;im4java&#39;, version: &#39;1.4.0&#39;</blockquote><blockquote>}</blockquote><ul><li>Tesseract -CPP Preset — It is the Java wrapper for Tesseract which is built on a CPP framework.</li><li>Leptonica — Its a dependency for Tesseract, through which we get support to several image formats. It also gets position and page layout Information.</li><li>JMagick — JMagick is the java interface for ImageMagick C-API.</li><li>Im4Java — It is the Java wrapper for ImageMagick. This fires command line ImageMagic commands using Java Process builder.</li></ul><p>We would also have to make sure we have ImageMagick setup in our machine. This could be easily done using brew.</p><ul><li>brew install imagemagick</li><li>brew info imagemagick — We can run this command to make sure the installation was successful.</li></ul><p>With this you are done with the setup and now you can start coding.</p><p><strong>How to improve the efficiency of the output using tesseract?</strong></p><ul><li>In order for Tesseract to work its best you would have to make sure the image is as clear as possible.</li><li>Which could might mean we would have to perform image modifications such as resizing, colorspace, contrast, morphology, filter(Gaussian, Triangle, Spline, etc), edge detection.</li><li>For this reason we will make use of JMagick which has a slew of functions which makes use of ImageMagick under the skin to perform image modifications.</li><li>Here are some useful links for performing Image Modifications</li></ul><blockquote><a href="http://www.fmwconcepts.com/imagemagick/downsize/index.php">http://www.fmwconcepts.com/imagemagick/downsize/index.php</a></blockquote><blockquote><a href="http://www.imagemagick.org/script/index.php">http://www.imagemagick.org/script/index.php</a></blockquote><ul><li>Below are sample images of what it was and how it needs to be for Tesseract to understand and perform OCR.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*tQJ3sdCIQ8NEQFOm_s56Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pceA5Ben2g_vP7ZEWwm3eg.png" /></figure><h3>Font Recognition?</h3><p>You can come across circumstances where Tesseract does not recognize respond with all the text seen on the image this could be due to the fact that Tesseract was not programmed to understand the font in the image. For this reason it becomes mandatory to identify the font, install and generate trained data files for the needed fonts.</p><p>Below are the steps to be able to achieve the same</p><ul><li>Install Tesseract on the machine</li></ul><blockquote>brew install — with-training-tools tesseract</blockquote><ul><li>Download and Install JTessBox Editor</li></ul><blockquote><a href="https://sourceforge.net/projects/vietocr/?source=typ_redirect">https://sourceforge.net/projects/vietocr/?source=typ_redirect</a></blockquote><ul><li>Identify the font in the image and install it on the system</li><li>Open the JTessBox Editor and choose the needed font and type in a sentence with all the needed characters.</li><li>Clicking on generate, would create .box and .tif files.</li><li>Now update the font name in the below code and run the python script using the below command</li><li>python tesseract-trainer.py</li></ul><p><strong>Python Tesseract Script</strong> Expand source</p><ul><li>Once the python script run successfully it will generate a slew of file and will add the same to the tesseract installable. Although you would need to copy them and add it to the tessdata folder in your project.</li></ul><p><strong>Useful links:</strong></p><blockquote><a href="http://scholarworks.sjsu.edu/cgi/viewcontent.cgi?article=1416&amp;context=etd_projects">http://scholarworks.sjsu.edu/cgi/viewcontent.cgi?article=1416&amp;context=etd_projects</a></blockquote><blockquote><a href="https://en.wikipedia.org/wiki/Tesseract">https://en.wikipedia.org/wiki/Tesseract</a></blockquote><blockquote><a href="http://im4java.sourceforge.net/">http://im4java.sourceforge.net/</a></blockquote><blockquote><a href="https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/">https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/</a></blockquote><blockquote><a href="https://github.com/tesseract-ocr/tesseract/wiki/APIExample">https://github.com/tesseract-ocr/tesseract/wiki/APIExample</a></blockquote><blockquote><a href="http://www.programcreek.com/java-api-examples/index.php?api=org.im4java.core.ConvertCmd">http://www.programcreek.com/java-api-examples/index.php?api=org.im4java.core.ConvertCmd</a></blockquote><blockquote><a href="http://im4java.sourceforge.net/docs/dev-guide.html">http://im4java.sourceforge.net/docs/dev-guide.html</a></blockquote><blockquote><a href="https://medium.com/@sathishvj/training-tesseract-ocr-for-a-new-font-and-input-set-on-mac-7622478cd3a1#.ju5p3mv47">https://medium.com/@sathishvj/training-tesseract-ocr-for-a-new-font-and-input-set-on-mac-7622478cd3a1#.ju5p3mv47</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99aba2dad314" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated Social Publishing]]></title>
            <link>https://medium.com/@balaajip/automated-social-publishing-9ebdcea76e4b?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ebdcea76e4b</guid>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[facebook]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Fri, 28 Apr 2017 21:27:31 GMT</pubDate>
            <atom:updated>2017-04-28T21:27:31.353Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By Balaaji </em>Parthasarathy</p><p>In the era of social media, it benefits an enterprise to be more social. There is a tremendous opportunity for a company to take its message to where its audience is, instead of waiting for an audience to find it. Well-tuned online social media content can enhance a company’s ability to attract new participants and drive business and traffic to its site. And social media provides a venue through which the company can learn more about its users’ decisions.</p><p>Any company that generates interesting content on a daily basis should be publishing their content to social media. At scale, it becomes prohibitive to do this manually. At Cars.com, we needed to find ways to publish our editorial department’s articles and reviews automatically to social platforms.</p><p><strong><em>Here is our mechanism to achieve this goal.</em></strong></p><p>The Cars.com editorial team creates a large volume of content on a daily basis, available to our site visitors. This content also needs to reach social media in parallel to reach a wider audience. The diagram below illustrates this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXY6QWQwMuNir1mRJTf94g.png" /></figure><p>Below is the architectural overview of how we achieved this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmdjKDGU2bXwrJifkNXj7Q.png" /></figure><h4>Technical Description:</h4><p>To build this automated pipeline, we used a pub-sub design pattern. Components involved for this implementation includes a publisher, subscriber, micro-services and gateway.</p><ul><li>When the content creators publish their content, the pipeline generates a “topic” with minimal information (like Article ID) required to process and execute the publication.</li><li>These publishers have a subscriber microservice listening for topics.</li><li>The microservices are responsible for gathering all the needed information for each topic and passing it on to the gateway.</li><li>The gateway is responsible for communicating to the outside world by making API calls to the social media platforms.</li><li>Most of these social media platforms need to have a developer account and a platform-hosted app through which access tokens are generated.</li><li>This app should also have the permission to read the page content, update the page, and log engagement analytics, like click throughs.</li><li>The gateway interacts with the platform apps for authentication/authorization and API calls.</li><li>Authenticating against these social media can sometimes be complex and might need encoding and encryption. To do this, we have external 3rd party frameworks(like Twitter4J) which make implementation easier with fewer lines of code.</li></ul><h4>Technical Documents:</h4><ul><li>Facebook development — <a href="https://developers.facebook.com/docs/apps/register">https://developers.facebook.com/docs/apps/register</a></li><li>Twitter development — <a href="https://dev.twitter.com/docs">https://dev.twitter.com/docs</a></li><li>Twitter4J — <a href="http://twitter4j.org/en/">http://twitter4j.org/en</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ebdcea76e4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your own URL Shortener at no cost]]></title>
            <link>https://tech.cars.com/your-own-url-shortener-at-no-cost-436e1cb11062?source=rss-258239145710------2</link>
            <guid isPermaLink="false">https://medium.com/p/436e1cb11062</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[no-cost]]></category>
            <category><![CDATA[custom]]></category>
            <category><![CDATA[url]]></category>
            <category><![CDATA[shortener]]></category>
            <dc:creator><![CDATA[Algorithm Of Life]]></dc:creator>
            <pubDate>Wed, 26 Apr 2017 16:00:16 GMT</pubDate>
            <atom:updated>2017-04-26T19:36:20.104Z</atom:updated>
            <content:encoded><![CDATA[<p>URL shortening is the process of translation of a long Uniform Resource Locator (<a href="http://searchnetworking.techtarget.com/definition/URL">URL</a>) into an abbreviated alternative that redirects to the longer URL.</p><p>This is often achieved by taking a very long URL for <a href="https://www.cars.com/dealers/183911/titan-auto-sales/reviews/">https://www.cars.com/dealers/183911/titan-auto-sales/reviews/</a> and shortening it using a redirect domain for example <a href="https://goo.gl/wScPWd">https://goo.gl/wScPWd</a></p><p>Short URLs are preferable for a number of reasons.</p><ul><li>Long URLs in email messages can break if they fail to wrap properly</li><li>Long URLs in Twitter tweets can leave no room for a message to accompany it</li><li>Long URLs in text messages can make the accompanying message difficult to read.</li></ul><p>URL shortening services typically provide users with:</p><ul><li>The ability to track, analyze and graph traffic statistics.</li><li>Make links more manageable.</li><li>Promote sharing</li></ul><p><strong>Providers:</strong></p><ul><li><a href="http://goo.gl/">Goo.gl</a></li><li><a href="http://bit.ly/">Bit.ly</a></li><li><a href="http://adf.ly/">adf.ly</a></li><li><a href="http://po.st/">po.st</a></li><li>rebrandly(Banding inside a 3rd party domain)</li><li>Tiny URL</li></ul><p>Open Source Options:</p><ul><li>Yourls</li><li>Polr</li></ul><p>Lets deep dive into a few of these options.</p><h3><a href="http://goo.gl/">Goo.gl</a></h3><p><a href="http://goo.gl/">Goo.gl</a> is a product of Google for URL shortening. It is intended to be the stablest, most secure, and fastest URL shortener on the web. This is a free of cost service and is open for everyone. What is does not offer is custom URLs and custom domains. You are stuck with whatever Google has to offer.</p><p><a href="https://goo.gl/">https://goo.gl</a></p><h3><a href="http://bit.ly/">Bit.ly</a></h3><p>Bitly is a link management platform. The company Bitly, Inc. was established in 2008. It is privately held and based in New York City. Bitly shortens 600 million links per month, for use in social networking, SMS, and email.</p><p><a href="http://bit.ly/">Bit.ly</a> does everything like <a href="http://goo.gl/">Goo.gl</a> does but also lets customization of the URL. <a href="http://bit.ly/">Bit.ly</a> is not a completely free service. They let you use 10K shortened links before they start charging you.</p><p>You can customize the first part of the URL by having your own domain and having its DNS configured for Bitly. A sample branded domain URL could look like — <a href="http://pbtan.tk/2o8gUkJ">http://pbtan.tk/2o8gUkJ</a>. Although only 500 such links could be generated for free, beyond which there is a upgrade option.</p><p>You can customize the second part of the URL(<a href="https://www.cars.com/dealers/5364201/webb-auto-outlet/">https://www.cars.com/dealers/5364201/webb-auto-outlet/</a>), to more meaningful information like <a href="http://bit.ly/WebbAuto">http://bit.ly/WebbAuto</a></p><p><a href="https://bitly.com/">https://bitly.com</a></p><h3>Open Source</h3><p>While you can make use of the publicly URL services there are benefits to hosting your own URL shortener, you get to use your own short domain name, it might be cheaper this way, you are in full control, you have access to all the metrics and data, it builds the inner geek in you and allows you to learn.</p><h3>Yourls</h3><p><strong>YOURLS</strong> stands for <strong>Your Own URL Shortener</strong>. It is a small set of PHP scripts that will allow you to run your own URL shortening service (<em>a la</em> TinyURL or bitly).</p><p>Running your own URL shortener is fun, geeky and useful: you own your data and don’t depend on third party services. It’s also a great way to add branding to your short URLs, instead of using the same public URL shortener everyone uses.</p><p><strong>How to implement:</strong></p><p><strong>.</strong> Create your own domain. I created a domain for free using <a href="http://www.dot.tk/en/index.html?lang=en">http://www.dot.tk/en/index.html?lang=en</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WVc3pDQOIf2IloPtV7itIA.png" /></figure><p><strong>.</strong>Once you have the domain, host the domain on webhosting providing like <a href="http://www.000webhost.com/">www.000webhost.com</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fafn3_McCcPJ_xOYecckuA.png" /></figure><p><strong>.</strong>Now update the name space server information of the domain to point to the webhostings server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*zYKOhOhVGJ7pdfmxSytEWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*r16HB-nNtUUOxaMQ8P2_lA.png" /></figure><p><strong>.</strong>Also In your webhosting choose set webaddress and say use your own domain and use the domain address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*KVKhTPcBsAZ9K9XdHVl-iQ.png" /></figure><p><strong>.</strong>Now you should be having a site up and running.</p><p><strong>.</strong>Download the source code from <a href="https://yourls.org/">https://yourls.org/</a></p><p><strong>.</strong>Goto Filemanager in the web hosting and copy all the files and rest of the information listed below is also available <a href="http://yourls.org/#Install">here</a> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*uf6_u0POU47qHTRZeVsLNg.png" /></figure><p><strong>.</strong>Copy user/config-sample.php to user/config.php</p><p><strong>.</strong>Create a MySql database and update the information in the user/config.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*whTk-eehsqo8waR5mb6c4A.png" /></figure><p><strong>.</strong>Now we are all set. Hit the URL <a href="http://your-own-domain-here.com/admin/">http://your-own-domain-here.com/admin/</a> and you should be able to see the Yourls page and that should help you navigate from there and create you own shortened URLs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTTIiYnM1zrgE-Y8huCUGw.png" /></figure><p><strong>.</strong>This implementation also has APIs and you should be able to access them securely using a username/password or your signature. This will let us create a get all the needed functionalities done through it remotely.</p><p><a href="http://carslab.tk/yourls-api.php?signature=fbb37bb5c1&amp;action=url-stats&amp;shorturl=http://carslab.tk/4">http://domainname/yourls-api.php?signature=token1&amp;action=url-stats&amp;shorturl=</a></p><p><a href="http://carslab.tk/yourls-api.php?signature=fbb37bb5c1&amp;action=db-stats">http://domainname/yourls-api.php?signature=token&amp;action=db-stats</a></p><p><a href="http://carslab.tk/yourls-api.php?signature=fbb37bb5c1&amp;action=shorturl&amp;url=https://www.cars.com/research/honda-accord/">http://domainname/yourls-api.php?signature=token&amp;action=shorturl&amp;url=https://www.cars.com/research/honda-accord/</a></p><p>There is more work going on with this framework and here is the road map — <a href="http://blog.yourls.org/">http://blog.yourls.org/</a></p><p><strong>Some Useful links:</strong></p><p><a href="https://project.polr.me/">https://project.polr.me/</a></p><p><a href="http://alternativeto.net/software/yourls/">http://alternativeto.net/software/yourls/</a></p><p><a href="http://mashable.com/2010/11/17/custom-short-url/#BJt10b2rQOqV">http://mashable.com/2010/11/17/custom-short-url/#BJt10b2rQOqV</a></p><p><a href="http://www.hifisocialweb.com/how-to-create-a-branded-short-url/">http://www.hifisocialweb.com/how-to-create-a-branded-short-url/</a></p><p><a href="http://mashable.com/2009/04/05/url-shorteners/#E9IpklV4Xiqy">http://mashable.com/2009/04/05/url-shorteners/#E9IpklV4Xiqy</a></p><p><a href="http://www.techzim.co.zw/2016/01/how-to-run-your-own-url-shortening-service/">http://www.techzim.co.zw/2016/01/how-to-run-your-own-url-shortening-service/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=436e1cb11062" width="1" height="1" alt=""><hr><p><a href="https://tech.cars.com/your-own-url-shortener-at-no-cost-436e1cb11062">Your own URL Shortener at no cost</a> was originally published in <a href="https://tech.cars.com/">Cars Commerce Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>