Skip to main content

Posts

Recent posts

Understanding Solidity: A Dive into the World of Smart Contracts

Understanding Solidity: A Dive into the World of Smart Contracts Understanding Solidity: A Dive into the World of Smart Contracts In the ever-evolving landscape of blockchain technology, Smart Contracts play a pivotal role in automating and securing transactions. Solidity, a high-level programming language, is at the forefront of this revolution, enabling developers to create robust and decentralized applications on blockchain platforms like Ethereum. In this blog post, we'll explore the basics of Solidity, its features, and its significance in the world of smart contracts. What is Solidity? Solidity is a statically-typed programming language designed for developing smart contracts that run on blockchain platforms. The language was specifically created for Ethereum, the leading decentralized platform for building decentralized applications (DApps) and executing smart contracts. Solidity is influenced by C++, Python, and JavaScript, making ...

Windows Service To Manage Worker Processes

In one of my projects I needed to have multiple instance of the same process running in parallel and each one of them if it fails for some reason needs to restart immediately. The idea was to have a message queue, in this case I'm using Azure, and multiple competing consumers (Each process is a consumer). I had differences options: 1. Create multiple windows services that would be managed by the operating system, but the main down side is that whenever I need to scale by increasing the number of consumers I'll have to install a new windows service, likewise if I want to scale down I'd have to stop services. 2. Create a windows service that is in charge of starting and maintaining a certain number of processes running at any time depending on the a configuration file. 3. The third option I've considered is using Azure workers, but I quickly dismissed it when I found out how much it was costing me, since these consumers are running continuously, but if it was for a li...

Full Text Search using Entity Framework

I've been working on a project where I needed to implement full time search on one table. My current solution was based on SQL Server db and Entity Framework 6. I had two choices implement the full text search in C# or use the functionality available in SQL server, since the data was stored in SQL Server the obvious solution was to use the built in full text search. How this works: 1. You need to activate and configure the full text search: Activate on the sql server table by using SSMS, and specify which columns are going to be included. 2. To perform a full text search in a T-SQL query you have the choice between 2 Boolean functions: Contains and Freetext or two functions that returns 2 columns tables. In my case I need a function that could be used in a where clause (Boolean), and decided to use 'Contains'. For more details about the difference between Freetext and contains have a look at this article . 3. I need to instruct EF6 to generate a particular T-SQL stateme...

Preparing for Azure Development Certification (70-532)

I've decided to get certified in AZURE, I'm aiming to get the MCSD certification which requires to pass 3 Exams: Developing Microsoft Azure Solutions 70-532 Implementing Microsoft Azure Infrastructure Solutions 70-533 Architecting Microsoft Azure Solutions 70-534 You can take the exams in the order you choose, in my case I've decided to take them in the order above. My strategy: I started by buying the recommended training books:                         After reading through the first book, I decided to take some mock tests, I quickly realised that the books are not sufficient :). Especially for 70-532. Therefor I decided to more studying online especially on the PowerShell cmdlets available to manage Azure Resources. As part of this effort I'm going to maintain in this blog a list of post for each set of PowerShell scripts, it is going to be a way to memorize it for me, and a way to ha...

Twitter API and Microsoft Text Analytics API in Python

Since we are getting closer to the French presidential election, and that I'm working on a project that involves using social media API and sentiment analysis, I've decide to post an example that will use these technologies to try and give an idea about each major candidate popularity. Solution description: 1. Collect social media information related to each candidate: For this example the main source is Twitter. 2. Extract sentiment for each Candidate from the Twitter posts collected previously. Implementation: For a quick implementation I decided to use python, but I'll definitely post a C# version as well. Code: 1. Twitter Client code: The code is pretty basic, I'm streaming the posts to a text file in son, by applying a list of filters; the names of the candidates I've decided to include: #Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream #Vari...

Getting started using Amazon Product Advertizing API in C#

Amazon Product API is a set of web services that are available for developers, to interact with Amazon e-commerce website (more details are available on Amazon website ): You can extract information about product: Get information about products, reviews, information about the company selling these items. Create a fully functional shopping cart The main goal for developers here is to advertise items sold on amazon website and get a commission from sales they generate through the associate program.(more details available on Amazon website ) Bellow I'm going to show a simple example on how to use this API: Pre-requisites: Become an Associate Become a Product Advertising API Developer Before coding you can try the web client provided by amazon: Product Advertising API Scratchpad Using the API: Now we can start coding. For this example I'm just going to create console app that calls the web service to retrieve some information: 1. List products for a given cate...