Exploring DNS with the .NET Core based Technitium DNS Server

Earlier this week I talked about how Your Computer is not a Black Box and I spent time time in TCPView and at the command line exploring open ports on my computer. I was doing this in order to debug an issue with a local DNS server I was playing with, so I thought I’d take a moment and look at that server itself.

The Technitium DNS Server is a personal local DNS server (FOSS on GitHub) written in C# and it runs on Windows, macOS, Linux, Raspberry Pi, etc. I downloaded the Portable app.

For Windows folks who aren’t used to .tar.gz files, remember to “eXtract Zie Files!” with “tar -xzvf DnsServerPortable.tar.gz -C ./TechnitiumDNS/” and it’s also worth reminding you all that tar.exe, curl.exe, wget.exe and more are all included in Windows 10 and have been since 2017. If that’s too hard, use 7zip.

Technitium DNS is pretty cool, you just unzip/tar it and run start.sh or start.bat and it “just works.” Of course, I did have a process already on port 53 – DNS – so I did a little debugging, but that was my fault.

Here’s the local web UI that you can use to administer the server locally. You can forward to whatever upstream DNS server you’d like, with the added bonus that the forwarder can be DNS over HTTPS so you can use things like CloudFlare, Google, or Cloud9. Using DNS over HTTPS means your DNS lookups can be secured with DNSSEC and are far more secure and private than regular DNS over UDP/TCP.

Technitium also includes support for DNS Sinkholes (similar to how I use my Pi-Hole) and Block List URLs. It’ll automatically download block lists daily and block ads.

Technitium is a lovely .NET Core based DNS Server

It’s also educational to try running your own DNS server and it’s fun to read the code! The code for Technitium’s DNS Server is up at https://github.com/TechnitiumSoftware/DnsServer and is super interesting from a networking perspective, but also from an C# perspective. It’s a very interesting example of some .NET Core code at a very low level and I’m thrilled that it works on every operating system.

There’s even bash scripts for setting Technitium up on your RaspberryPi or Ubuntu to make it easy. If you are using Windows and don’t care about .NET Core you can use the .NET that’s included with Windows and Technitum has a Tray app and Installer as well.

Some of the code isn’t “idiomatic” C#/.NET Core but it’s interesting to read about. The main DnsWebService.cs is pretty intense as it doesn’t use any ASP.NET Core routing or primitives. It’s a complete webserver written using only System.Net and its own support libraries, along with some of the lower-level Newtonsoft.Json libraries.

The main DnsServer is also quite low level and very performant. It lives in DnsServer.cs. It opens up n sockets (depending on how many ports you bind to) and starts accepting connections here. DNS Datagrams start getting parsed here, right off the stream. The supporting libraries and networking helper code lives over at https://github.com/TechnitiumSoftware/TechnitiumLibrary which is a wealth of interesting and useful code covering BitTorrent, Mail, and Firewall management. There’s a ton of OO representations of networking concepts, and all the DNS records are parsed manually.

Technitium has a DNS Server, client, Mac Address Changer, and open source instant messenger. The developer is extremely prolific. They even host a version of “Get HTTPS for free” that works with Windows and makes getting Let’s Encrypt certificates super easy.

Anyway, I’ve been enjoying exploring DNS again and reminding myself not only that it still works great (since I learned about DNS from sniffing packets in networking class) and it’s been updated and improved with caches, DNSSEC, DNS over HTTP and more in the years following.

Here I’ve set my IPv4 DNS to 127.0.0.1 and my IPv6 DNS to ::1, then I run NSLookup and try some domain lookups.

Looking up domains at the command line with nslookup

Again, to be clear, the local DNS server took these lookups and then forwarded them upstream to another server. However, you have the choice for your upstream lookups to be done over whatever protocols you want, you can use Google, OpenDNS, Quad9 (with DNSSEC or without), and on and on.

Are you running your own DNS Server?


Sponsor: Manage GitHub Pull Requests right from the IDE with the latest JetBrains Rider. An integrated performance profiler on Windows comes to the rescue as well.


© 2018 Scott Hanselman. All rights reserved.

     

from Scott Hanselman’s Blog http://feeds.hanselman.com/~/601093768/0/scotthanselman~Exploring-DNS-with-the-NET-Core-based-Technitium-DNS-Server.aspx

Top Tips For PCB Design Layout

Are you thinking about designing a printed circuit board? PCBs are quite complicated, and you need to make sure that the layout that you choose is going to operate as well as you want it to. For this reason, we have put together some top tips for PCB design layout. Keep reading if you would like to find out more about this.

Top Tips For PCB Design Layout

Leave Enough Space

One of the most important design tips for PCB layout is that you need to make sure that you are leaving enough space between the components. While many people might think that packing components closely is the best route to take, this can cause problems further down the line. This is why we suggest leaving extra space for the wires that will spread. This way, you’ll have the perfect PCB design layout.

Print Out Your Layout

Struggling to find out if your components sizes match? Our next tip is to print out your layout and compare the printed version to your actual components. Datasheets can sometimes come with errors, so it doesn’t hurt to double check the sizes in real life. If you take some time to do this, you can be sure that the sizes will match.

Think About Width Of Line

When you are deciding the width of the lines in your PCB design, you should make sure that you are choosing this based on the current. If you have a larger current flowing through the lines, then you should make sure to adapt your design to suit this. There are some online calculators that you can use to help make this decision.

Talk To Your Manufacturer

If you spend a long time working on your PCB design project before you have spoken to a manufacturer then you might find that you come across some problems. You need to find out about any specifications that they might have that could affect the design of your project. Use their guidelines to create your design and you’ll find things a lot simpler further down the line.

Compare Your Schematic

Our final tip for those who want to improve their PCB design layout is to compare the layout to the original schematic. You have spent time working on your schematic for a reason so make sure to utilise the tools that allow you to directly compare these. This way, you can be sure that your layout matches what you need for this particular project.

Final Verdict

If you are going to be working on PCB design project in the near future, make sure to take on board all of the tips that we have given you in this article. Think about leaving enough space between your components and considering the width of your lines. You should also make sure to talk with your manufacturer about their specifications before going ahead with the project. This way you’ll have a successful design that will help to create a working PCB.

The post Top Tips For PCB Design Layout appeared first on The Crazy Programmer.

from The Crazy Programmer https://www.thecrazyprogrammer.com/2019/04/top-tips-for-pcb-design-layout.html

8 Things Every Design Student Needs To Know To Succeed

Are you an artistic designer but a little lost in your creative processes?

Don’t worry as it happens to all of us so that’s why I decided to write this blog.

If you are just starting out on your design career path or just curious for some extra tips then this should give you some needed help.

8 Things Every Design Student Needs To Know To Succeed 1

Organize Yourself

This is something that all design students should learn to master and take control of their own calendar. If you can prioritize your projects and manage all the different deadlines then this will help in the long run. You will be able to concentrate on being creative and not miss targets later on.

There are many great ways to keep track from getting a simple calendar and marking projects and deadlines on it or downloading an app with reminders straight to your phone. Also, a great tip I picked up at Uni was completing boring writing assignments that were getting in the way of my creative time. EssayPro is an essay writing service that I used to finish off my work and left me more free time to concentrate on more important design projects.

Be the King of Estimation

The biggest skill I learned to develop would be overestimating time frames for projects. The more successful design assignments completed the better at this you will become. Every project requires a different amount of time to complete so being able to allow yourself enough time is vital. If you have more time left over you can always start something new or try to improve the project. This will help you later on with your design career when your boss piles on the workload and being able to manage it effectively.

Find your Niche

There are a lot of good designers out there but you should find your special talent or market that you enjoy doing and appealing to. Throughout your career especially at the start, you will have to undertake more mainstream tasks. This is great, I even still do this sometimes when the price is right. It is important to find your inner strength and what work really makes you happy. Also, stay good friends and network with other designers in different fields. You never know when they can help out with a project or to find new work. Either way, keep connections from University and in the future try to make new ones also.

Make a Portfolio to Impress

This is basically your resume for future work. So as soon as possible you should start adding different projects that show off your talents. Depending on which area of design you specialize in will depend on how it will look, for example, a graphic design student portfolio will look different to a senior art director’s portfolio but still vital. I would recommend having an online copy and also a printed physical copy to take to interviews as it can give that ‘wow’ factor if done well. I got some nice tips from Canva on how to put a portfolio together that can turn some heads. Always try to pursue work that interests you as I think this is really important, but if a job is not what you had hoped do not be scared to leave it. This is all experience that you can use and also put in your portfolio.

8 Things Every Design Student Needs To Know To Succeed 2

Stay Motivated

While studying there will be times you will become frustrated and unmotivated to carry on. So it is important to be passionate in your work and find ways to stay motivated. Remember passion fuels creativity, which is so fundamental to design. I used to ask myself what I love doing in design and then remind myself in difficult times. This will help you complete your studies successfully and happily.

Keep the Creativity Going

There will be times that your creativity will start drop, but there are ways in which you can maintain and improve it. Don’t be scared to come up with new ideas to gain more inspiration. If they are not welcome don’t get disheartened, just keep what you learned and move onto the next project. They are all skills that can come in useful later on.

Make Friends with Criticism

You are a design student to learn, and there will be lots of times a teacher or peer will not agree with your point of view and give negative critique on your creations. All criticism should be met with an open mind and take it on board to improve your work in the future. This is something that is very difficult to do at first, I used to get very defensive about my work. Later on, you will be able to discuss things through and realize you can learn a lot from other people.

Keep up with New Trends

This also may depend on which area of design you are involved in, but the idea is the same. If you are a painter then maybe change the style or technique to what’s popular at the time. This makes sure you will be popular and remain successful. Also trying to predict holiday trends can help stay on top of your game even for senior graphic designers. Keep your self-development ongoing by attending courses related to your design area this will make sure you are not ‘out of touch’ with your clients. The world of visual design is always changing so its important to keep up to date with it.

Most Importantly: Don’t forget to Believe in yourself!

I hope these tips helped you out and you succeed in your chosen path. Hard work will always lead you to success. I would be interested to see what tips you picked up, so leave something in the comments section below even if you just want to say hi. Good luck!

The post 8 Things Every Design Student Needs To Know To Succeed appeared first on The Crazy Programmer.

from The Crazy Programmer https://www.thecrazyprogrammer.com/2019/04/8-things-every-design-student-needs-to-know-to-succeed.html

R vs Python for Machine Learning

There are so many things to learn before to choose which language is good for Machine Learning. We will discuss each and everything about R as well as Python and the situation or problem in which situation we have to use which language. Let’s start

Python and R are the two most Commonly used Programming Languages for Machine Learning and because of the popularity of both the languages Novice or you can say fresher are getting confused, whether they should choose R or Python language to commence their career in the Machine learning domain. Don’t worry guys through this article we will discuss R vs Python for Machine Learning. So, without exaggerating this article let’s get started.

We will start it from the very Basics things or definitions.

R vs Python for Machine Learning

Introduction

R is a programming language made by statisticians and data miners for statistical analysis and graphics supported by R foundation for statistical computing. R also provides high-quality graphics and it also has some popular libraries which help in analytical parts such as R Markdown and shiny.

On the other hand, Python is a simple, easy, fully-fledged and object-oriented high programming language which is used for web development or Software Development made by the very good programmers and the developers’ for the use of general purpose programming. Python is far-flung used in GUI based application’s such of them are games, graphics design, Web applications.

So, guys we can say that R programming language functionality is developed by statisticians’ mind, by thereby give us an advantage in a specific field. While python is often praised for being a general-purpose language with an easy-to-understand.

Speed

Let us start from the very first factor, that is the speed of the language.

R vs Python

When it comes to the speed, python is faster than R only till 1000 iterations but after the 1000 iterations, R starts using the lapply function which increases its speed, in that situation R becomes faster than python. So, both have their own advantages with their limits. let move to the next point i.e code and syntax.

Code and Syntax

In this point, we will discuss the data variables declarations, Data handling capacity with the scatterplot visualization and the clusPlot graphics.

R vs Python 2

Starting with variable declaration. Let’s take the case of string here. As R uses the similar implementation to that of the S programming language, which uses arrow sign in order to initialize the variables which were also present in case of S programming. These arrows can be used from right to left or left to right indicating whom to assign the variables whereas, python uses an assignment operator to initialize the variables.

So, Basically, R developers thought that it would be better to tell the direction of the assignment rather than just using an assignment operator, which could actually confuse any new programmer about which variable is assigned. next thing data handling capability, here we will discuss the case of Scatterplots’, by which you will see the visualizations in R and Python.

R vs Python 3

These are the piece of codes in R and Python and after running  these codes, you will get the very similar plot results in both the cases, if you check the code here, then this shows that how R data science ecosystem has many smaller packages like GGally, which basically is a package that helps ggplot2 and also it is the most-used R plotting package whereas, In Python, matplotlib  is the  primary plotting package, and seaborn is widely used layer over the matplotlib. So, these are plots result we were talking about. Graph results of R and Python are both similar, but the only difference is their visualization. So, based on the graph results we can conclude that R has Many packages supporting different method of doing things whereas there is usually one way to do something in python. Moving to the next thing that is graphics.

So, guys here we will discuss the case plots, we already discussed that R was basically built for statistically analysis, so it has many specific libraries for plotting as well. This is the reasons R come up with beautiful graphs and charts whereas python’s main agenda, not for statistical analysis. So, in the early stages of the python packages for data analysis was an issue, but it has improved a lot.

Deep Learning

As you all know almost the majority of the companies are working on Artificial Intelligence (AI), and Deep Learning is the main part of artificial intelligence. So, when it comes to Deep Learning, Python is more versatile then R as it provides more features to deep learning whereas R is new to Deep Learning.

R vs Python 4

R has newly added APIs like Keras and KerasR which are written in Python. So, guys somewhere in your mind, this question might be floating why Keras? Actually, Keras in Python has the capabilities to run over pythons’ strong APIs like tensorflow or Theano or Microsoft’s CNTK we can say that python has the greater advantage here. Till now we learn both are useful in their own areas or terms.

Percentage Switching

R vs Python 5

In the past years of Research, the percentage of switching people R to Python are more as compared to Python to R. Let’s say if 10% people are switching from Python to R then, 20% are switching from R to Python which is double as compared to the before scenario. Next point this about trend community support and jobs.

Trends

R v Python Google Trend

So, guys lets talk about trend according to the google in last 5 years. The R was more in use but after that, we can see Python is in trend because of its popularity it has overall good support of general purpose programming. If we talk about community support:

R vs Python 6

Python and R support are quite similar to each other because python supports Mailing list, User-contributed code documentation, and Stack-overflow. So, basically it has more adoption from developers and programmers whereas R language support as also found at Mailing list, User-contributed documentation, and Active Stack-overflow members So, basically R has more adoption for researchers, DataScientist and Statisticians.

Job Trend

Now, lets talk about the job trend.

R v Python Jobs Trend

This is the google graph of the job trend of Python and R. So, guys this Job Posting of R and Python in past 5 years worldwide whereas Python is asked more in comparison to R. How it is possible? because of its popularity and easy to understand feature. Since python is a very versatile programming language which can be used for majority of the purpose such as web-development, game development, artificial intelligence, data science, statistical analysis, etc, whereas R language used among statisticians and Data miners for developing statistical software and Data analysis which clear us that’s why more job for python than R.

In the end, I would like to say both the programming languages are important with their uses. But as we discussed in the previous section python is booming over the years.

The post R vs Python for Machine Learning appeared first on The Crazy Programmer.

from The Crazy Programmer https://www.thecrazyprogrammer.com/2019/04/r-vs-python-for-machine-learning.html

Your computer is not a black box – Understanding Processes and Ports on Windows by exploring

TCPViewI did a blog post many years ago reminding folks that The Internet is not a Black Box. Virtually nothing is hidden from you. The same is true for your computer, whether it runs Linux, Mac, or Windows.

Here’s something that happened today at lunch. I was testing a local DNS Server (more on this on Thursday) and I started it up…and it didn’t work.

In order to test a DNS server on Windows, you can go to the command line and run “nslookup” then use the command “server 1.1.1.1” where 1.1.1.1 is the DNS server you’d like to try out. Go ahead and try it now. Run cmd.exe or powershell.exe and then run “nslookup” and then type any domain name. You should get an IP address.

Given that I was trying to run a DNS Server on localhost:53 (Port 53 is where DNS usually hangs out, just like Port 80 is where Web Servers (HTTP) hang out and 443 is where Secured Web Servers (HTTPS) usually are) I should be able to do this. I’m trying to send DNS requests to localhost:53

C:\Users\scott> nslookup

Default Server: pihole
Address: 192.168.151.6

> server 127.0.0.1
Default Server: localhost
Address: 127.0.0.1

> hanselman.com
Server: localhost
Address: 127.0.0.1

*** localhost can't find hanselman.com: No response from server
> hanselman.com

Weird, that didn’t work. Let me try a DNS Server I know works like Google’s 8.8.8.8 public DNS

> server 8.8.8.8

Default Server: google-public-dns-a.google.com
Address: 8.8.8.8

> hanselman.com
Server: google-public-dns-a.google.com
Address: 8.8.8.8

Non-authoritative answer:
Name: hanselman.com
Address: 206.72.120.92

Ok, it seems my local DNS isn’t listening on point 53. Checking the logs of the Technitium local DNS server shows this:

[2019-04-15 23:26:31 UTC] [0.0.0.0:53] [UDP] System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted

at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at DnsServerCore.DnsServer.Start() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsServer.cs:line 1234
[2019-04-15 23:26:31 UTC] [0.0.0.0:53] [TCP] DNS Server was bound successfully.
[2019-04-15 23:26:31 UTC] [[::]:53] [UDP] DNS Server was bound successfully.
[2019-04-15 23:26:31 UTC] [[::]:53] [TCP] DNS Server was bound successfully.

The DNS Server’s process is trying to bind to TCP:53 and UDP:53 using IPv4 (expressed as localhost with 0.0.0.0:53) and then TCP:53 and UDP:53 using IPv6 (expressed as localhost using [::]:53) but it seems like the UDP binding to port 53 on IPv4 failed. Weird.

Someone else is listening in on Port 53 localhost via IPv4.

That’s weird. How can we find out what ports are open locally?

I can run “netstat” and ask Windows for a list of all TCP/IP connections and the processes that are listening on which ports. I’ll also PIPE the results to “clip” which will put it in the clipboard automatically. Then I can look at it in a text editor (or I could pipe it through find or findstr).

You can run netstat –help to get the right arguments. I’ve asked it to tell me the process IDs and all the details it can.

Active Connections

Proto Local Address State PID

TCP 0.0.0.0:53 LISTENING 27456
[dotnet.exe]

UDP 0.0.0.0:53 LISTENING 11128
[svchost.exe]

TCP [::]:53 *:* 27456
[dotnet.exe]

UDP [::]:53 *:* 27456
[dotnet.exe]

Hm, a service is already listening on port 53. I’m running Windows 10, not a Server so it’s odd there’s already a DNS listener on port 53.

I wonder what service is it?

I can check the Services Tab of the Task Manager and sort by PID. Or can I run “tasklist” and ask directly.

C:\WINDOWS\system32>tasklist /svc /fi "pid eq 11128"


Image Name PID Services
========================= ======== ============================================
svchost.exe 11128 SharedAccess

That’s Internet Connection Sharing, and it’s used by Docker and other apps for NAT translation and routing. I can shut it down with the sc (service control) or with “net stop.”

C:\WINDOWS\system32>net stop sharedaccess

The Internet Connection Sharing (ICS) service is stopping.
The Internet Connection Sharing (ICS) service was stopped successfully.

Now I can start my DNS Server again (it’s written in .NET Core) and I can see with tcpview.exe that it’s listening on all appropriate ports.

TCPView showing everything on Port 53

In conclusion, it’s a good reminder to refresh yourself on the basics of IPv4, IPv6, how processes talk to/allocate ports, what Process IDs (PIDs) are, and their relationships. Much of this is taught in computer science university courses but if you’re self taught or not doing low level work every day it’s easy to forget.

Virtually nothing on your computer is hidden from you!


Sponsor: Manage GitHub Pull Requests right from the IDE with the latest JetBrains Rider. An integrated performance profiler on Windows comes to the rescue as well.


© 2018 Scott Hanselman. All rights reserved.

     

from Scott Hanselman’s Blog http://feeds.hanselman.com/~/600875412/0/scotthanselman~Your-computer-is-not-a-black-box-Understanding-Processes-and-Ports-on-Windows-by-exploring.aspx

Blocking ads before they enter your house at the DNS level with pi-hole and a cheap Raspberry Pi

image

Lots of folks ask me about Raspberry Pis. How many I have, what I use them for. At last count there’s at least 22 Raspberry Pis in use in our house.

A Pi-hole is a Raspbery Pi appliance that takes the form of an DNS blocker at the network level. You image a Pi, set up your network to use that Pi as a DNS server and maybe white-list a few sites when things don’t work.

I was initially skeptical, but I’m giving it a try. It doesn’t process all network traffic, it’s a DNS hop on the way out that intercepts DNS requests for known problematic sites and serves back nothing.

Installation is trivial if you just run unread and untrusted code from the ‘net 😉

curl -sSL https://install.pi-hole.net | bash

Otherwise, follow their instructions and download the installer, study it, and run it.

I put my pi-hole installation on the metal, but there’s also a very nice Docker Pi-hole setup if you prefer that. You can even go further, if, like me, you have Synology NAS which can also run Docker, which can in turn run a Pi-hole.

Within the admin interface you can tail the logs for the entire network, which is also amazing to see. You think you know what’s talking to the internet from your house – you don’t. Everything is logged and listed. After installing the Pi-hole roughly 18% of the DNS queries heading out of my house were blocked. At one point over 23% were blocked. Oy.

NOTE: If you’re using an Amplifi HD or any “clever” router, you’ll want to change the setting “Bypass DNS cache” otherwise the Amplifi will still remain the DNS lookup of choice on your network. This setting will also confuse the Pi-hole and you’ll end up with just one “client” of the Pi-hole – the router itself.

For me it’s less about advertising – especially on small blogs or news sites I want to support – it’s about just obnoxious tracking cookies and JavaScript. I’m going to keep using Pi-hole for a few months and see how it goes. Do be aware that some things WILL break. Could be a kid’s iPhone free-to-play game that won’t work unless it can download an add, could be your company’s VPN. You’ll need to log into http://pi.hole/admin (make sure you save your password when you first install, and you can only change it at the SSH command line with “pihole -a -p”) and sometimes disable it for a few minutes to test, then whitelist certain domains. I suspect after a few weeks I’ll have it nicely dialed in.


Sponsor: Seq delivers the diagnostics, dashboarding, and alerting capabilities needed by modern development teams – all on your infrastructure. Download at https://datalust.co/seq.


© 2018 Scott Hanselman. All rights reserved.

     

from Scott Hanselman’s Blog http://feeds.hanselman.com/~/600808018/0/scotthanselman~Blocking-ads-before-they-enter-your-house-at-the-DNS-level-with-pihole-and-a-cheap-Raspberry-Pi.aspx

Accessibility Insights for the Web and Windows makes accessibility even easier

Accessibility InsightsI recently stumbled upon https://accessibilityinsights.io. There’s both a Chrome/Edge extension and a Windows app, both designed to make it easier to find and fix accessibility issues in your websites and apps.

The GitHub for the Accessibility Insights extension for the web is at https://github.com/Microsoft/accessibility-insights-web and they have three trains you can get on:

It builds on top of the Deque Axe core engine with a really fresh UI. The “FastPass” found these issues with my podcast site in seconds – which kind of makes me feel bad, but at least I know what’s wrong!

However, the most impressive visualization in my opinion was the Tab Stop test! See below how it draws clear numbered line segments as you Tab from element. This is a brilliant way to understand exactly how someone without a mouse would move through your site.

I can easily see what elements are interactive and what’s totally inaccessible with a keynote! I can also see if the the tab order is inconsistent with the logical order that’s communicated visually.

Visualized Tab Stops as numbered points on a line segment that moves through the DOM

After the FastPass and Tab Visualizations, there’s an extensive guided assessment that walks you through 22 deeper accessibility areas, each with several sub issues you might run into. As you move through each area, most have Visual Helpers to help you find elements that may have issues.

Checking for accessible elements on a web site

After you’re done you and export your results as a self-contained HTML file you can check in and then compare with future test results.

There is also an Accessibility Insights for Windows if I wanted to check, for example, the accessibility of the now open-source Windows Calculator https://github.com/Microsoft/calculator.

It also supports Tab Stop visualization and is a lot like Spy++ – if you remember that classic developer app. There were no Accessibility issues with Calculator – which makes sense since it ships with Windows and a lot of people worked to make it Accessible.

Instead I tried to test Notepad2. Here you can see it found two elements that can have keybook focus but have no names. Even cooler, you can click “New Bug” and it will create a new accessibility bug for you in Azure DevOps.

Test Results for Windows apps being checked for accessibility

The Windows app is also open source and up at https://github.com/Microsoft/accessibility-insights-windows for you to explore and file issues! There’s also excellent developer docs to get you up to speed on the organization of the codebase and how each class and project works.

You can download both of these free open source Accessibility Tools at https://accessibilityinsights.io and start testing your websites and apps. I have some work to do!


Sponsor: Seq delivers the diagnostics, dashboarding, and alerting capabilities needed by modern development teams – all on your infrastructure. Download at https://datalust.co/seq.


© 2018 Scott Hanselman. All rights reserved.

     

from Scott Hanselman’s Blog http://feeds.hanselman.com/~/600780338/0/scotthanselman~Accessibility-Insights-for-the-Web-and-Windows-makes-accessibility-even-easier.aspx

Coders: Context Switching is hard for both computers and relationships

Coders: The Making of a New Tribe and the Remaking of the World

Clive Thompson is a longtime contributing writer for the New York Times Magazine and a columnist for Wired and now has a new book out called “Coders.”

“Along the way, Coders thoughtfully ponders the morality and politics of code, including its implications for civic life and the economy. Programmers shape our everyday behavior: When they make something easy to do, we do more of it. When they make it hard or impossible, we do less of it.”

I’m quoted in the book and I talk about how I’ve struggled with context-switching.

Here is TechTarget’s decent definition of Context Switching:

A context switch is a procedure that a computer’s CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict. Effective context switching is critical if a computer is to provide user-friendly multitasking.

However, human context switching is the procedure we all have to go through to switch from “I am at work” mode to “I am at home” mode. This can be really challenging for everyone, no matter their job or background, but I propose for certain personalities and certain focused jobs like programming it can be even worse.

Quoting Clive from an ArsTechnica article where he mentions my troubles, emphasis mine:

One of the things that really leapt out is the almost aesthetic delight in efficiency and optimization that you find among software developers. They really like taking something that’s being done ponderously, or that’s repetitive, and optimizing it. Almost all engineering has focused on making things run more efficiently. Saving labor, consolidating steps, making something easier to do, amplifying human abilities. But it also can be almost impossible to turn off. Scott Hanselman talks about coding all day long and coming down to dinner. The rest of the family is cooking dinner and he immediately starts critiquing the inefficient ways they’re doing it: “I’ve moved into code review of dinner.”

Ordinarily a good rule of thumb on the internet is “don’t read the comments.” But we do. Here’s a few from that ArsTechnica thread that are somewhat heartening. It sucks to “suffer” but there’s a kind of camaraderie in shared suffering.

With reference to “Scott Hanselman talks about coding all day long and coming down to dinner. The rest of the family is cooking dinner and he immediately starts critiquing the inefficient ways they’re doing it: “I’ve moved into code review of dinner.””

Wow, that rings incredibly true.

That’s good to hear. I’m not alone!

I am not this person. I have never been this person.

Then again, I’m more of a hack than hacker, so maybe that’s why. I’m one of those people who enjoys programming, but I’ve never been obsessed with elegance or efficiency. Does it work? Awesome, let’s move on.

That’s amazing that you have this ability. For some it’s not just hard to turn off, it’s impossible and it can ruin relationships.

When you find yourself making “TODO” and “FIXME” comments out loud, it’s time to take a break. Don’t ask me how I know this.

It me.

Yep, here too 2x–both my wife and I are always arguing over the most efficient way to drive somewhere. It’s actually caused some serious arguments! And neither one of us are programmers or in that field. (Although I think each of us could have been.)

From the day I was conscious I’ve been into bin packing and shortest path algorithms–putting all the groceries up in the freezer even though we bought too much–bin packing. Going to that grocery store and back in peak traffic–shortest path. I use these so often and find such sheer joy in them that it’s ridiculous, but hey, whatever keeps me happy.

This is definitely a thing that isn’t programmer-specific. Learning to let go and to accept that your partner in life would be OK without you is an important stuff. My spouse is super competent and I’m sure could reboot the router without me and even drive from Point A to Point B without my nagging. 😉

However we forget these things and we tend to try and “be helpful” and hyper-optimize things that just don’t need optimizing. Let it go. Let people just butter their damn bread the way they like. Let them drive a mile out of the way, you’ll still get there. We tend to be ruder to our partners than we would be to a stranger.

That’s part of the reason why I’m now making all dinners for my family 😉

LOL, this is also a common solution. Oh, you got opinions? Here’s the spatula!

What do YOU think? How do you context switch and turn work off and try to be present for your family?


Sponsor: Manage GitHub Pull Requests right from the IDE with the latest JetBrains Rider. An integrated performance profiler on Windows comes to the rescue as well.


© 2018 Scott Hanselman. All rights reserved.

     

from Scott Hanselman’s Blog http://feeds.hanselman.com/~/600699960/0/scotthanselman~Coders-Context-Switching-is-hard-for-both-computers-and-relationships.aspx

Agile Software Development Mistakes to Avoid

According to a survey taken of the Scrum Alliance, approximately 70 percent of all groups handling Agile software development believe there are issues present between various internal departments within the company.

The fact is, Agile groups work at a much faster pace. In order to mark progress, they use various markets, and in some cases, this puts staff members in direct conflict with each other.

The disjunction described above among Agile groups, as well as their peers, is a common mistake in the realm of Agile software development. However, there are a number of other reasons that some Agile projects are unsuccessful as well.

You can learn about some of these issues here, and if you have some problems not listed in the article, you can check out DaniWeb software development forum. Knowing what these mistakes are can help you avoid them.

Agile Software Development Mistakes to Avoid

Not Using Customer Input

There is a large number of groups that don’t pay attention to or use the information that is gathered from their customers when creating project designs. It’s smart to use feedback from customers so that you aren’t creating something that’s completely irrelevant.

Improper Training of the Agile Team

According to the Agile Alliance, up to 30 percent of the people who responded to the study mentioned above stated that they were not provided with sufficient training. Some even claimed that they received minimal training on the methodologies used by the company.

Not Being in Sync with Other Departments

Are you in sync with other departments? If you aren’t, you are going to find it virtually impossible to meet the job approximation objectives. This is especially true if the other departments in question are integral to the success of the job or if they are focused on a timeline that isn’t associated with the development group.

Subpar Estimates

Quickness and velocity are essential when it comes to receiving the proper estimates. As a result, you need to be mindful when you are providing your group with practice time. It’s essential to provide accurate estimates before you give any type of compliance promises.

Inadequate Engagement

The majority of members of a group may be working in a remote location from time to time. This makes it much more challenging to have important conversations about important parts of the project that is going on. With that being said, most remote workers are only going to highlight the things that would still be an issue if everyone was working in the same building – inadequate engagement.

The Inability to Conduct the Retrospectives

If you bypass the retrospective step in the Agile software development methodology, you are not providing your bigger group with the opportunity to assess and to enhance their own productivity. This can lead to negative consequences for the entire group.

Minimal Group Effort and Excessive Orders

You should not work with a top-down methodology. Modern Agile leaders are encouraged to work and lead their group members toward a solution, rather than try to make them complete separate jobs on an individual basis.

The Agile Development isn’t Being Supported by the Company Culture

There are far too many companies that have a conflicting culture to the Agile methodology. This is going to result in subpar results for the entire team.

If you want a successful Agile development process, then it is absolutely imperative that you know about the most common mistakes that are made. When you know what these mistakes are, you can take steps to ensure they don’t occur. In the long run, this is going to lead to a much higher rate of success.

The post Agile Software Development Mistakes to Avoid appeared first on The Crazy Programmer.

from The Crazy Programmer https://www.thecrazyprogrammer.com/2019/04/agile-software-development-mistakes-to-avoid.html

Difference between Primary Key and Foreign Key

A “key” is one of the most basic and important concepts of the Database Management System (DBMS); the keys helps us work easily with the records and the tables in our database by providing us with the ease of accessing and retrieving the data from the table. A primary key is the first key to be understood as it uniquely identifies the particular record of any table. The primary key and foreign key however, must not be confused with each other as they have a completely different definition as well as usage. Here are the differences between the two.

Difference between Primary Key and Foreign Key

Image Source

Difference between Primary Key and Foreign Key

S.no. Primary key Foreign key
1 The primary key of a particular table is the attribute which uniquely identifies every record and does not contain any null value. The foreign key of a particular table is simply the primary key of some other table which is used as a reference key in the second table.
2 A primary key attribute in a table can never contain a null value. A foreign key attribute may have null values as well.
3 Not more than one primary key is permitted in a table. A table can have one or more than one foreign key for referential purposes.
4 Duplicity is strictly prohibited in the primary key; there cannot be any duplicate values. Duplicity is permitted in the foreign key attribute, hence duplicate values are permitted.
5 Example:

Consider the table student, which keeps record of students in a class:

Here, Id is the primary key which uniquely identifies each record in the table “student”

ID NAME Address
101 ABC x
102 DEF y
103 GHI z
104 JKL w
Now, let us consider the table teacher, which records the teachers in the school:

Here Tid or teacher id is the unique primary key, for each record in the table. This table uses the “ID” attribute which is the primary key of the “student” table as its reference key or foreign key to refer to the student the particular teacher teaches, :

TID NAME TAddress ID
1 Priya P 101
2 Riya R 102
3 Sam S 102
4 Tom T 103

Since one student is taught by more than one teachers, the ID attribute (which is the foreign key in this table), contains duplicate values.

The foreign key of one table although is derived from the primary key of the other table, holds completely different characteristics and these differences are crucial which should be taken care of to avoid any errors.

Comment below if you have queries related to primary key vs foreign key.

The post Difference between Primary Key and Foreign Key appeared first on The Crazy Programmer.

from The Crazy Programmer https://www.thecrazyprogrammer.com/2019/04/difference-between-primary-key-and-foreign-key.html