ThatSoftwareDude

Musings of a .NET Developer, CTO and Tech Enthusiast

#C#
implementing google's invisible recaptcha in .net

If keeping bots away is your thing, then using Google's reCAPTCHA is a must. And while it can be tedious to click on 20 images of cars in order to verify that I'm human, it will keep your database clean from spam. Thanks to the new Invisible reCAPTCHA users won't know that there is a security measure in place until after they perform some action on your website. Which is good from a UX standpoint as seeing a reCAPTCHA field might deter some users from signing up. Sounds weird, but it's true.

. . .
Read more
3
creating credit card charges with stripe and .net

In this post I'll be going over the Stripe API and more specifically, using it in a .NET environment. I'll say right now that Stripe and the internet do not make this an easy task for a .NET developer. Stripe offers examples in everything except .NET and most online examples use 3rd party libraries to get the job done. But where's the fun in that. I'll be going over the entire process without using any 3rd party apps, and just using the native .NET classes and the HTTP API services that Stripe provides.

. . .
Read more
15
how to post a tweet using c# for single user

In this post I'll be showing how to post a Tweet to Twitter using C# and no 3rd party libraries. This is a pure .NET approach, and it's more time consuming but it also gives you a much deeper understanding of how oAuth and Twitter work together behind the scenes. I'll be breaking down the entire process step by step from generating the appropriate tokens to the final signed request getting sent off. As of me writing this, Twitter's REST API is on version 1.1, so it isn't future proof, but for now it'll do the job.

. . .
Read more
working with generics in c#

In this post I will talk about another nifty feature that C# has offered for a while now, Generics. You probably won't run into Generics on a day to day basis. If you work alot with data collections however, you might find them useful at some point. I've probably personally used Generics twice on my own personal websites, and they come in extremely handy and can save alot of time and help avoid writing too much repetitive code. If you're familiar with C++, Generics are somewhat comparable to Templates in the old STL.

What are Generics?

With Generics you can postpone setting parameter types to a function or class until that function or class has been instantiated by the client. So for example, let's say that we have a function that performs a generic operation on a set of parameters being passed in.


public class SampleClass
{
    public void DoWork(int data)
    {
        // do something with the data, anything
    }
}

That's pretty straightforward. But now let's assume that we want to have the same operation run but instead of an integer, it takes in a decimal value.

. . .
Read more
working with delegates in c# for beginners

I don't normally run into delegates in my day to day coding, but at some point you will run into them and you'll want to know what they are and how they work. This has also been a popular interview question that I've received in the past, and normally one that I found difficult to answer. At the very least having a textbook definition at the ready will at least have you somewhat prepared. Good news for us, delegate are simple structures and relatively easy to use.

. . .
Read more
2
implementing amazon's product advertising api in c#

If you have an Amazon Affiliate account then at some point in your life you're probably going to be tired of managing products manually and will want a more automated approach, like I did on Laptop-Info.com.

. . .
Read more
creating an xml document in asp.net

There are various different approaches to XML document creation in .NET. There is no right or wrong way really, it just depends on the situation and what you're more comfortable with. You need to generate an XML file in an hour? Then have it and glue together your data manually in XML and save it into a file with a .xml extension. You need a reusable and scalable XML generation tool? Then you can use a more programmatic approach to the problem. Lucky for us the .NET Framework can help us out with whatever approach we want to take.

. . .
Read more
how to watermark images in c#

As a developer, I hate using 3rd party software to accomplish things that would take a few minutes or hours of work. For example, watermarking images. At my last job one of the websites that I happened to grace my eyes upon had such a library to watermark uploaded images. One day, it stopped working and I had to figure out why. Days later, it turned out that there had been an update to that library and it required some further configuration that didn't get updated and there we were.

. . .
Read more
implementing dll's for your asp.net site

Code re-use is at the heart of any good developer and it is a very welcomed ally when the time arrives. The last thing you want to do when working on a project is to find yourself making a small change and then having to deploy it across a dozen different pages. Write once, use everywhere. By defining our own DLL's with our custom generalized code we can keep all of our most commonly used code in a single project and then deploy it across all of our other projects.

. . .
Read more
adding controls programmatically in asp.net

The beauty of working on .NET web forms is that every control that you see on the screen is an object of some kind, inheriting from the base Object. Which means that we have the liberty of working with them in all kinds of ways. We can drag them onto the designer, or position them manually (as I'm assuming every single person does), and if the need arise we can also add then programmatically to our web pages. Say for example that the fields we collect for a user table such as name, lastname, email, etc all come from a database table. In this case, if we ever needed to collect more information, we'd simply just add a record to our database. So we have to create these controls on the fly when the page loads. I'll document the process in the way that I learned it the first time I tried it out.

. . .
Read more
Load older posts
"sometimes you have to delete, to find your answer"
Copyright © 2018 thatsoftwaredude.com
humans.txt
TOP SCORES
Score in the top 10 and leave your Instagram handle.
Start
0
snake left
snake up
snake down
snake right