Skip to main content

An open letter to all recruiters

On behalf of all candidates

Posted in Business, Misc, Career, Personal life

Dear recruiters,

Sometimes you call. In this call you offer the supposed perfect job opportunity to work in the outstanding perfect company: The company has amazing benefits, the salary is great and the environment is outstanding.

Sometimes you are serious and focus only about the position. Sometimes you are friendly and love to talk about your dog. And, of course, sometimes we can notice that you don’t want to talk. That’s ok, everybody has the right to be different. And we all have bad days. Personally, I prefer the friendly ones. Only because they make me believe that I am the most special person in the world. And when you call me in my bad day to make me feel special, you totally won. But the serious ones are good too.

There is only one thing: Apparently you have some issues on matching my profile with the job offers you are presenting to me.

Allow me to explain.

Most of the offers I get from you are “C# Developer”. And yes, I know C#. But the problem lies in the field and also the projects. Mostly this kind of position would lead me to work in a company where I will go very deep into C# and never see anything else. For example, some company where I should work on a system to control, let’s say, traffic lights. Would I work there? Maybe. But it's not a good fit.

See, I am a web person specialized on the ASP.NET stack. In my line of work I need to understand a bit of front-end so I can make a good quality back-end, matching them together in a nice result for the client. This is what I have been doing most of my career. If you doubt just check my Linked In profile. Go to my specialties and certifications so you will see that they are mostly focused on web.

But it's alright, I still like you.

I believe it’s not your fault. You might have goals to reach and you might not have enough time to check a a lot of profiles thoroughly. All of this is understandable. And it’s ok for me as I can say that I am not interested in case you offer something which is not a good fit.

But I care about you. I care about the time you are devoting with me and other candidates which are not a good fit for the positions you are presenting. We know that every candidate you interview who is not a fit makes you lose money (time = money). And your company is losing money as well.

So, here is the advice: Try to understand the position you are going to offer and also try to learn a little bit more about the candidates before the call. And don't shoot e-mails crazily about random job offers only because there is one key word matching. It's not about keywords anymore - it's about meaning. Of course, sometimes I would be motivated to change everything. It can even happen that, some day, I will really be interested to work programming for NASA and see my code going to other galaxies.

But not yet.

In my perticular case, I am focused on web. After all, I am a web person. And since I am a web person you can talk with me about websites developed and I will gladly listen to any offer you will present related with the ASP.NET stack.

Sincerely,

Davidson Sousa

Did you like the article?

You can subscribe and get them as soon they are online, share using the buttons bellow or leave a comment.

And you also can share using your favorite social network:

The best way to use DropDownListFor with ASP.NET MVC

Things don't need to be difficult and, of course, do everything you can to reuse your code

Posted in C#, Code snippets, Tutorials, ASP.NET

One of the most annoying things on ASP.NET MVC is to create a decent dropdown list, and Scott Allen already covered it here nicely. While I like his explanation I often see people facing different scenarios. What I will describe here is the way I use to create the dropdown lists for all my projects.

The problems

  1. Create a common place dropdowns will be placed, so we can maintain it easily;
  2. Get the data from somewhere;
  3. Put the minimum necessary logic into the Controller;
  4. Show it in the View.

The solution

First of all, we need a class. I will use a Model, as example, since this data can also come from the database.

This class has only 2 properties since it’s all you need to use with a DropDownListFor. But keep in mind that your class can have other properties.

Now, we need the code to generate the items for the DropDownListFor.

I have this code in a helper specially build for dropdown lists. In this way, as mentioned before, I can ease the maintenance of the project. And if you didn't notice, this code is concatenating with the DefaultItem property, which I show below.

This property will add the standard "-SELECT-" item at the first position in our dropdown list.

Also, you will see once you download the code that I am hard coding the items in the DropDownListHelper's constructor. In the real world I would load the data directly in the property.

Now that we have the class (Model) and the helper, we will go for the ViewModel. This is a pretty standard situation: I personally like to keep my Model exclusively for database while my ViewModel is the one going to create the forms. The reason is that I can customize the ViewModel for my needs, not needing to have a Model with a lot of properties using [NotMapped] on the top.

Here is what we need in the ActionMethod.

And here is the View.

Some might say it’s an unnecessary effort, and I would agree if we would use only one dropdown list. However, when we start building bigger systems which are going to use multiple dropdown lists, this approach comes in handy.

You can check the full code in my GitHub repository: https://github.com/davidsonsousa/DropDownList

Did you like the article?

You can subscribe and get them as soon they are online, share using the buttons bellow or leave a comment.

And you also can share using your favorite social network:

Create a video gallery with modal using ASP.NET and Bootstrap

Learn how to create a video gallery using the Youtube API with ASP.NET and Bootstrap modal

Posted in API, Youtube, Code snippets, Tutorials, ASP.NET, JavaScript

We are in the 3rd article of the series about Youtube API. The articles are:

  1. Load a single predefined video
  2. Load a custom video with the Youtube API in ASP.NET
  3. Create a video gallery with modal using ASP.NET and Bootstrap (this article)

We saw in the previous how to load a custom video from the backend using ASP.NET. For this one we will use the same approach to create our gallery, plus Bootstrap for the modal.

The player

We will need to put the player we saw on the first article in the Bootstrap modal, as it’s shown below.

The Javascript

There are 2 scripts to be used. The first one is the general script, which I've shown in the previous articles and it didn't change. The second one is the script below, which will handle the video gallery.

The View

As you saw in the javascript above we are using only one modal. The magic happens in the code below, where I am passing all parameters via data-* attribute. I am using the same Model from the previous article.

As you can see there is no mystery on working with Youtube API and ASP.NET. And the next article will show how you can detect the state of the videos, which is very important for tagging and user interaction.

Check the full code here: https://github.com/davidsonsousa/YoutubeAPI

Did you like the article?

You can subscribe and get them as soon they are online, share using the buttons bellow or leave a comment.

And you also can share using your favorite social network:

Load a custom video with the Youtube API using ASP.NET

Learn how to load a video from the backend (ASP.NET) using the Youtube API

Posted in API, Youtube, Code snippets, Tutorials, ASP.NET, JavaScript

Let’s continue with this very simple series of articles about the Youtube API. The articles are:

  1. Load a single predefined video
  2. Load a custom video with the Youtube API in ASP.NET (this article)
  3. Create a video gallery with modal using ASP.NET and Bootstrap

On the previous article, we saw how to load a predefined video using the API. It was simple and clean, while we could load only that specific video. In the real world that would be a bit different since we would have to load the video from diferent sources, by using the backend. In this article we will see how we load the from the backend using ASP.NET

The player

We will use a div tag as player, which should be handled by the javascript later.

<div id="player"><div>

The Javascript

We will split this script in 2 parts: The general script, which makes the API calls and the Video script, which actually calls the video.

General script

We use this one just once, as we did before.

Video script

Here is the trick. Since I am using ASP.NET MVC here and I need to have some flexibility since we are using the back end to bring the video, I will need to put the script in a partial view. Also, I am passing the Video model, which should bring all the parameters needed for the video.

Video model

Here is the model I am using. Keep in mind that such model could bring the video data from a database, for example. Or some web service.

That's it.

Next article will be about a video gallery opening a video in a modal window. All of it using videos loaded from the backend in ASP.NET MVC and bootstrap.

Check the full code here: https://github.com/davidsonsousa/YoutubeAPI

Did you like the article?

You can subscribe and get them as soon they are online, share using the buttons bellow or leave a comment.

And you also can share using your favorite social network:

How to use the Youtube API to load a single video

Learn how to use the Youtube API and javascript to load only one video

Posted in API, Youtube, Code snippets, Tutorials, JavaScript

The most common way to embed any video on Youtube is: Click in Share, Embed, copy the code and place in the website. I guess everybody used this at least once but let’s be realistic: This is not the best approach when you are working with clients as you never know what the client is going to ask in the future. It might happen the client will not request anything extra. Or he might ask to record the time the user paused the video.

My idea here is to make a very simple series of 4 articles which should cover the most basic usage of Youtube API. And they are:

  1. Load a single predefined video (this article)
  2. Load a custom video with the Youtube API in ASP.NET
  3. Create a video gallery with modal using ASP.NET and Bootstrap

For this series I am going to use the Youtube API for iframe embeds which forces the HTML5 player and it’s better for compatibility with mobile. You will find the code to download in the end of the article.

The player

When embedding a video we normally get a code like this:

<iframe width="560" height="315" src="https://www.youtube.com/embed/XdlmoLAbbiQ" frameborder="0" allowfullscreen><iframe>

However, since we are going to use the Youtube API, we will need a very simple code:

<div id="player"><div>

The Javascript

Here is where the magic happens. The javascript code will load the video we want and replace that div with the proper embed code. However, I will split this script in 2 parts.

General script

This script is used only to make the API calls. Note that we are using this approach since we still don’t have full support for async javascript calls straight from the script tag, so this script should take care of this for us. We need to call it just once.

Video Script

After setting the API call we need to load the video and the way we will do that is also through javascript. So far, in this example, all we will need is the video dimensions (height and width) and also the ID. We will set this up in the function onYouTubeIframeAPIReady(), which is executed once the API is ready to be used.

That’s it for now. In the next article I will show a very simple way to load a custom video. And for that I will use ASP.NET to simulate some database retrieval. But you can use your language/framework of choice.

Check the full code here: https://github.com/davidsonsousa/YoutubeAPI

Did you like the article?

You can subscribe and get them as soon they are online, share using the buttons bellow or leave a comment.

And you also can share using your favorite social network: