Software Architect at Genzeon Corporation in Malvern, Pennsylvania, Microsoft .NET MVP, Husband, Dad and Geek.
31624 stories
·
21 followers

Microsoft mourns the passing of co-founder Paul Allen

2 Shares

Microsoft is mourning the passing of Paul Allen, a renowned philanthropist and business leader who co-founded the company more than four decades ago. He was 65.

Allen died Monday from complications of non-Hodgkin’s lymphoma, according to a statement from Vulcan Inc. on behalf of the Allen family, Vulcan Inc. and the Paul G. Allen Network.

In a written statement, Microsoft CEO Satya Nadella noted Allen’s huge impact on technology and much more:

“Paul Allen’s contributions to our company, our industry and to our community are indispensable. As co-founder of Microsoft, in his own quiet and persistent way, he created magical products, experiences and institutions, and in doing so, he changed the world. I have learned so much from him – his inquisitiveness, curiosity and push for high standards are something that will continue to inspire me and all of us at Microsoft.

“Our hearts are with Paul’s family and loved ones. Rest in peace.”

An archival photo of Allen can be downloaded here.

The post Microsoft mourns the passing of co-founder Paul Allen appeared first on The Official Microsoft Blog.

Read the whole story
sbanwart
3 hours ago
reply
Akron, OH
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

TypeScript Tutorial: How to Make Code Reusable

1 Share
In this TypeScript tutorial, the last in a three-part series, we explain how to adhere to the DRY principle — making TypeScript code reusable — using generics and namespaces.

Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Microsoft CEO Satya Nadella’s statement on the passing of Paul Allen

2 Shares

Microsoft CEO Satya Nadella’s statement on the passing of Microsoft co-founder Paul Allen:

Paul Allen’s contributions to our company, our industry and to our community are indispensable. As co-founder of Microsoft, in his own quiet and persistent way, he created magical products, experiences and institutions, and in doing so, he changed the world. I have learned so much from him – his inquisitiveness, curiosity and push for high standards are something that will continue to inspire me and all of us at Microsoft. Our hearts are with Paul’s family and loved ones. Rest in peace.

The post Microsoft CEO Satya Nadella’s statement on the passing of Paul Allen appeared first on The Official Microsoft Blog.

Read the whole story
sbanwart
3 hours ago
reply
Akron, OH
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Get ready! Game Off returns in November

1 Share

Game Off 2018

Game Off is our annual game jam, where participants spend one month creating games based on a theme that we provide. Everyone around the world is welcome to participate, from newbies to professional game developers—and your game can be as simple or complex as you want. It’s a great excuse to learn a new technology, collaborate on something over the weekends with friends, or create a game for the first time!

Last year, the theme was “throwback” and over 200 games were created—everything from old school LCD games, and retro flight simulators, to squirrel-infested platformers.

We’re announcing this year’s theme on Thursday, November 1, at 13:37 pm (PDT). From that point, you have 30 days to create a game loosely based on (or inspired by) the theme.

Join the jam on itch.io now

Using open source game engines, libraries, and tools is encouraged, but you’re free to use any technology you want. Have you been wanting an excuse to experiment with something new? Now’s your chance to take on a new engine you’d like to try.

As always, we’ll highlight some of our favorites games on the GitHub Blog, and the world will get to enjoy (and maybe even contribute to or learn from) your creations.

Help—I’ve never created a game before!

With so many free, open source game engines and tutorials available online, there’s never been an easier (or more exciting!) time to try out game development.

Are you…

  • Into JavaScript? You might be interested in Phaser.
  • Comfortable with C++ or C#? Godot might be a good match for you.
  • Proficient with Python? Check out Pygame.
  • Dangerous with Java? Take a look at libGDX.
  • In love with Lua (and/or retrogames)? Drop everything and check out LIKO-12.

Do you really like retro games? Maybe you can…

Whatever genre of game you’re interested in and language you want to use, you’re bound to find a GitHub project that will help you take your game from idea to launch in only a month.

Have a repository or tutorial you’d like to share, tag us with #GitHubGameOff.

Help—I’ve never used version control, Git, or GitHub before!

Don’t worry, we have tons of resources for you. From how to use Git, to all things GitHub, you’ll “git” it in no time.

  • GitHub Help offers tons of information about GitHub, from basics like creating an account, to advanced topics, such as resolving merge conflicts
  • Git documentation has everything you need to know to start using Git (including version control)

Did you know? You don’t have to use Git on the command line. You can use GitHub Desktop (our client for macOS and Windows), or bring Git and GitHub to your favorite editors:

GLHF! We can’t wait to see what you build! 💙 ❤️

Octocat pixel art animation

Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Mark Seemann & Brendan Richards – Dependency Injection, Unit Testing, & C# vs F#, an AMA! from NDC Sydney 2018

1 Share
NDC returned to Sydney this year and SSW TV was there alongside .NET Rocks! to catch all of the action with our Ask Me Anything! sessions. As usual there were a host of top industry pros talking about various subjects related to software development. This year, SSW TV worked alongside .NET Rocks! to run and […]
Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Writing a simple time server in Golang

1 Share
“two black flat screen computer monitors” by Fotis Fotopoulos on Unsplash

Backend development is a hot topic right now, and there are literally thousands of languages to write a server with. You have the oldest contender PHP, you have Ruby, Python, Java, C++, JavaScript and a plethora of other languages.

Golang, or just Go, is relatively newer in this field. It’s written by Google, and is compiled and statically typed and is focused mainly towards networking. Here are some of the features of Go that make it a great choice to run on a server

  1. Speed: Go is compiled to machine code, which makes it really fast and gives an edge over other interpreted languages like Ruby, Python or JavaScript.
  2. Static typing: Go is statically and strongly typed language. So the compiler can catch a lot of errors due to variable types during compilation. For example, in JavaScript, sudden type coercion can lead to unexpected results or errors during runtime (think of “5” + 5 = “55”). This is not the case with Go.
  3. Easy to learn: Go’s syntax is inspired from C and is easy to learn. Go isn’t overburdened with features and doesn’t take a long time to grasp the concepts.
  4. Concurrency: This is Go’s selling point. Go has goroutines (pun on coroutine) which are lightweight processes. Go does not only provide CPU parallelisms but also asynchronous operations. Using a goroutine is as easy as putting go in front of a function name, and communicating between goroutines are really easy through channels.
  5. Great standard library: Go has a rich standard library that makes it easy to handle I/O, writing servers, managing cryptography works etc.
  6. Testing: You don’t need to have any external dependency to test. If you have file.go write your tests in file_test.go and then run go test and voila!

Now let’s write a simple little server in Go. This will just be a basic server which will give you the current time.

Installing Go

First you need to install Go. For that I’ll send you off to the official docs.

After you have installed Go, you can move on to the coding part.

Setting Up

Now first, let’s create the project folder. At this point, we probably don’t need a folder, but we will expand on this server later and add more features, so it’s better to have a proper structure.

First we’ll create a directory named “go-server” in the Go installation directory. On Linux, that would be ~/go/src/. On Linux, you can run this command –

mkdir -p ~/go/src/${USER}/go-server

Now you’ll have a directory under ~/go/src/your_username/

Writing the server

We are now ready to write the code, but first we need to download the mux package. So run this command –

go get -u github.com/gorilla/mux

This will install the mux package so that we will be able to use it in our project.

Now move to the directory you just created and create a file called main.go and write the following

package main
import(
"fmt"
"net/http"
"github.com/gorilla/mux"
"time"
)
func main() {
r := mux.NewRouter()
r.HandleFunc("/time", GetTime)
http.ListenAndServe(":8000", r)
}
func GetTime(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Current time is %s\n", time.Now())
}

Let’s try to understand what’s happening.

package main

This line tells the compiler that the file is part of the “main” package. Packages can be thought of as logical units that can be imported elsewhere.

import (
...
)

This line imports the 4 packages we’ll be using.

  1. fmt: To format and write the response
  2. net/http: To create the server
  3. mux: To write the router
  4. time: To get the current time
func main() {
...
}

This defines the main function. This is the function that will be run.

r := mux.NewRouter()

This creates a variable named r which is a mux router. A router manages the routes of your server. It takes an incoming request and matches is against a set of registered routes and accordingly drives the request.

r.HandleFunc("/time", GetTime)

Here we register a route called “/time” and tell the router that if we have a request in the “/time” route, you invoke the GetTime() function (defined later)

http.ListenAndServe(":8000", r)

Finally, we start the server at port 8000 and pass the router.

Let’s take a look at the GetTime function

func GetTime(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Current time is %s\n", time.Now())
}

The route functions must take two parameters. One is a http.ResponseWriter and another is a *http.Request (pointer to http.Request) Here we have named the w and r respectively.

w will be used to write to the response, and r will be used to access the request. Here we don’t have anything to get from the request so we just write to the response using fmt.Fprintf. We take the current time using time.Now() .

Running the server

Make sure you are in the same directory as the main.go file. Then run this command –

go run main.go

Now you’ll be able to hit localhost:8000 and get a response –

curl localhost:8000/time

And here’s the response –

Current time is 2018-10-13 00:34:09.017262763 +0530 IST m=+1.012663595

Conclusion

So now you know how to write a simple server in Go. You can try on your own to implement new routes. For example, hitting /time/day will give only the day, hitting /time/month will give only the month and so on!

Follow my blog at http://www.codingskillsnull.xyz

✉️ Subscribe to CodeBurst’s once-weekly Email Blast, 🐦 Follow CodeBurst on Twitter, view 🗺️ The 2018 Web Developer Roadmap, and 🕸️ Learn Full Stack Web Development.

Writing a simple time server in Golang was originally published in codeburst on Medium, where people are continuing the conversation by highlighting and responding to this story.

Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete
Next Page of Stories