|
I’ve been writing a lot of golang lately. I’ve hit painful problems in the past. Here are some debugging tips. Hopefully they help you out. I bet you don’t know #2. #0 Use log.Printf : This should go without saying, but I’m ashamed to say it’s what I use the most. We’ve only been C programming for 44+ years, and it’s still what is most useful! #1 Use go run -race : Since many problems are caused by random races, ensuring..
|
|
How does it feel, to return to Germany after a few weeks in Africa? There are no people on the streets. There are no loud sounds. It smells of nothing. It is supposed to be a rich country but is defined by absence.
|
|
We’ve all encountered it at one point or another: poor customer support. And it seems to get worse on a weekly basis. “Poor” has many flavors: Not understanding what you want (well, this is actually the better case; the worse The post The Problem with Customer Support appeared first on FullStack - Ofer Zelig's Blog .
|
|
As some point I had to generate a random MAC address. This is the snippet I used: import random def randomMAC(): mac = [0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff), ] return ':'.join(map(lambda x: "%02x" % x, mac)) print 'MAC => %s' % randomMAC() MAC => 00:16:3e:7e:f7:fa
|
|
I'm often asked by other developers about parts of the pixel workflow, and what fires when and why, so I figured it might be worth putting up a little reference for what's involved in shipping pixels to screen.
|
In the GOF book, the interpreter pattern is probably one of the most poorly described patterns. The interpreter pattern basically consists…
|
|
I'm often asked by other developers about parts of the pixel workflow, and what fires when and why, so I figured it might be worth putting up a little reference for what's involved in shipping pixels to screen.
|
|
Absolute vividness and beautiful prose allowing the reader to be fully immersed in the forgotten history of both the Vietnam War…
|
|
You can use "M-x apropos-variable " to get documentation for variables matching a pattern. For more flexibility, some elisp can help with getting a list of all variables matching a regexp: (defun ar/variables-matching-pattern (pattern) "Get a list of all variables matching PATTERN." (let ((matched-variables '())) (mapatoms (lambda (symbol) ;; Symbol is variable? (when (and (boundp symbol) (string-match pattern (symbol-name symbol))....
|
|
Take a function \(f\) that maps from some bit string of length \(N\) to another bit string also of length \(N\). Suppose that this function is a 'hash function' with some properties we want: 1) Given an output value, it takes on average \(2^{N-1}\) evaluations of different inputs passed to \(f\) before we get the given output value. Note that if we try all \(2^N\) different inputs, we will definitely find the input that gives the outpu....
|
|
Based on Linting Prose in Emacs … Needs proselint installed: pip install proselint Also needs a flycheck checker defined: (flycheck-define-checker proselint "A linter for prose." :command ("proselint" source-inplace) :error-patterns ((warning line-start (file-name) ":" line ":" column ": " (id (one-or-more (not (any " ")))) (message) line-end)) :modes (gfm-mode markdown-mode org-mode text-mode)) (add-to-list 'flycheck-check..
|
|
I know, I know, I don’t write as often as I used to. I have an excuse or two for this week though, I swear. Between helping a friend move, drinking some Puzzled Pints , volunteering with Destination Imagination , trying out (and struggling with) yoga and swing dancing (not at the same time), celebrating the Chinese New Year , and biking 50 miles to watch the Super Bowl with friends, I’ve been a reasonably busy bus bum. I also have ..
|
|
I know, I know, I don’t write as often as I used to. I have an excuse or two for this week though, I swear. Between helping a friend move, drinking some Puzzled Pints , volunteering with Destination Imagination , trying out (and struggling with) yoga and swing dancing (not at the same time), celebrating the Chinese New Year , and biking 50 miles to watch the Super Bowl with friends, I’ve been a reasonably busy bus bum. I also have ..
|
|
The Future of Web Development (Part 2): Full-Stack Automated JavaScript Testing
-
engineering.widen.com
-
10 years ago
-
eng
In my last article, I showed you how to develop a full-stack JavaScript web application using some pretty interesting and futuristic libraries and web specifications. In this follow-up, I'm going to demonstrate how you can write server-side and client-side unit and integration/Selenium tests for that app entirely in JavaScript.
|
|
When this post gained much traction in HackerNews and r/golang, I was both suprised and happy. The general interest made me more motivated to do more and write more. And also some good discussions happend on HackerNews thread that was & will be helpful to me. I decided to package myinit in Go, and rename it to gonit Contributions and ideas are welcome through email and in the issues of the GitHub repo.
|
|
From Generate go struct definition from json file , and before I forget: curl http://url.tld/file.json | gojson -name=Repository
|
|
I previously noted how to undo your last git commit (ie. soft reset) . Using Magit: M-x magit-log-current . Move point to prior revision. M-x magit-reset-soft (defaults to revision at point). Or if you want a single function: (require 'magit) (defun ar/magit-soft-reset-head~1 () "Soft reset current git repo to HEAD~1." (interactive) (magit-reset-soft "HEAD~1"))
|
|
CSS Filters are awesome, but you can't do individual channel manipulation with them. Enter: feColorMatrix, SVG filter effect method that allows for really in-depth pixel value manipulation for even better image filters.
|
|
Sending emails to our half million and growing user community
-
engineering.hackerearth.com
-
10 years ago
-
eng
At hackerearth we send emails to keep our users updated on upcoming challenges and their activities, for example, when a user successfully solves a problem, receives test-invitation, updates on user comments. Basically whenever it is appropriate. Architecture It takes lot of computational power to send emails in such large quantities synchronously. So we have implemented an asynchronous architecture to send emails. Here is brief overvie....
|
|
So you’re a roboticist, looking at Ubuntu Core and Snappy, trying to decide if they’re a good fit for your project. You come across some ROS documentation and realize that the ROS support is first-class, but you’re not using ROS. No, you’re using the Mission Oriented Operating Suite (MOOS). Why is there no documentation on using MOOS? Because it’s too easy to need a document, that’s why (update: this remains true, but we wrote a quick one a..
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
|
I am working on myinit.go. Init process is no good if it cannot spawn other processes. I will use the other processes for critical functionality, i.e getting an IP address for future interactivity over SSH or maybe HTTP, or possibly Web Sockets. Because, why not? Anyways, I modified myinit.go to following and put it in the /init folder to have a nicer structure. It basically spawns a new process, and prints it output.
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|