Gopher Academy announced a great program today.
Today I’d like to announce the GopherCon Scholarship Program. It’s goal is to increase the visibility of women in the Go community through the most direct path I can imagine: sponsoring their attendance to GopherCon 2014.
The program works by you purchasing one of these special tickets. There will be a selection/nomination process and those woman selected will be able to attend GopherCon thanks to you.
Continue readingIntroduction
There are lots of posts that talk about the internals of slices, but when it comes to maps, we are left in the dark. I was wondering why and then I found the code for maps and it all made sense.
https://golang.org/src/runtime/hashmap.go
At least for me, this code is complicated. That being said, I think we can create a macro view of how maps are structured and grow. This should explain why they are unordered, efficient and fast.
Continue readingIntroduction
The first thing I did when I started programming in Go was begin porting my Windows utilities classes and service frameworks over to Linux. This is what I did when I moved from C++ to C#. Thank goodness, I soon learned about Iron.IO and the services they offered. Then it hit me, if I wanted true scalability, I needed to start building worker tasks that could be queued to run anywhere at any time.
Continue readingWith the release of Go 1.2, slices gained the ability to specify the capacity when performing a slicing operation. This doesn’t mean we can use this index to extend the capacity of the underlying array. It means we can create a new slice whose capacity is restricted. Restricting the capacity provides a level of protection to the underlying array and gives us more control over append operations.
Here are the release notes and design document for the feature request:
Continue readingIntroduction
I am very excited about the Beego web framework. I wanted to share with you how I use the framework to build real world web sites and web services. Here is a picture of the sample website the post is going to showcase:
The sample web application:
Implements a traditional grid view of data calling into MongoDB Provides a modal dialog box to view details using a partial view to generate the HTML Implements a web service that returns a JSON document Takes configuration parameters from the environment using envconfig Implements tests via goconvey Leverages my logging package The code for the sample can be found in the GoingGo repository up on Github:
Continue readingAt Ardan Studios we have spent the last 6 months, in our spare time and on weekends, building a consumer based mobile application called OutCast. The mobile application is tailored towards those who like spending time outdoors, whether that be fishing, hunting or any other type of activity.
This first release of OutCast shows the conditions for the buoy stations and marine forecasts areas within the United States. All this information is updated every 10 minutes and there are map views with traditional grids and search.
Continue readingThis is a guest post from Tad Vizbaras from Etasoft in South Florida. There are a number of editors and IDEs for Go development. LiteIde, Vim, Emacs and GEdit just to name a few. Each developer has their own favorite editor for each language they work with. Some like full featured IDE environments while others prefer speed over features. My personal favorite editors for Go development at the moment are Vim and GEdit.
Continue readingHave you ever found yourself in this situation. You have a case statement inside of a for loop and you would like to break from both the case and for statements in a single call?
var err error
timeout := time.After(30 * time.Second)
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, os.Interrupt)
complete := make(chan error)
go launchProcessor(complete)
for {
select {
case <-sigChan:
atomic.StoreInt32(&shutdownFlag, 1)
Continue readingLinux is unique to Windows in many ways, and writing programs in Linux is no exception. The use of standard out, standard err and null devices is not only a good idea but it’s the law. If your programs are going to be logging information, it is best to follow the destination conventions. This way your programs will work with all of the Mac/Linux tooling and hosted environments.
Go has a package in the standard library called log and a type called logger.
Continue readingI am working on a project that requires pulling and processing different XML feeds from the web and storing the data into MongoDB as JSON. Since new feeds come up everyday, changing the Go program to process and publish new feeds is out of the question. A second constraint is that processing has to work in Iron.io or any other linux cloud based environment.
What I needed was a Go program that could take an XML document and XSLT stylesheet at runtime, transform the XML into JSON and then store the JSON to MongoDB.
Continue reading