Skip to content

Instantly share code, notes, and snippets.

View alan-andrade's full-sized avatar
💻

Alan Andrade alan-andrade

💻
View GitHub Profile
let mut groups: ~[libc::gid_t] = ~[];
let n_groups = unsafe { libc::getgroups(69, groups.as_mut_ptr()) };
id(25518,0x104579000) malloc: *** error for object 0x7fc449c04528: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
@alan-andrade
alan-andrade / id.rs
Last active August 29, 2015 13:56
integrate Rust with C
// The C method signature is as follows:
int
getgrouplist(const char *name, int basegid, int *groups, int *ngroups);
// My Rust extern block
extern {
fn getgrouplist(name: *libc::c_char,
basegid: libc::c_int,
There are two pieces of information that the local provider and this method
are interested on and therefore the duplication.
1. User subscription status
2. User brain area of focus (from the personalization survery, the most relevant brain area)
This data is used to figure out which "scriptId" should be returned in the
resulting string.
What seems confusing, is the name of the method. It implies that "scriptId" is

Facts and fallacies of sw eng.

This starts with management because most of the high-leverage, high-visibility things that happend in sw are about it. Failure and successes are attributed to management.

Good management is more important that good techonology

Use the power of being a peon. (ref. The power of peonage).

Code Reviews

Engineers know who will be reviewing their tasks before they begin. Upfront planning can help avoid iteration during review.

Follow a style guide.

App knowledge is distributed. the eng. should rely on teammates to make it happen.

Change code to... improve code. You Refactor.

When dealing with unreleased code, but not always.

Code that was written without tests, is basically free play when change is needed. You have to accept the downside of high probabilities of changing behavior.

You can move code arround without an specific goal but a somewhat defined idea that will hopefully clear out as you go.

Mision

"Brindar el apoyo necesario a nuestros clientes"

Creo que decir "el apoyo necesario" no suena muy alentador. Podemos cambiarlo para decir algo mas atractivo. por ejemplo: "Brindamos apoyo profesional"

Pienso que es obvio que tus clientes son quienes vas ayudar entonces podemos quitarlo para ser mas concisos.

How to be a great software engineer ?

I've been asking myself this question for the past 6 months. I thought I'd find answers in books or people would tell me, but no luck. News is, none of that got me a precise answer. In fact, when I interviewed my friends, I was expecting to find my course, but more questions came up instead. I let the enigmas sink in my head and I kept my ears open. This is what I believe now:

There's no such thing as being "great". Being great is a paradox in

@alan-andrade
alan-andrade / parser.swift
Last active September 14, 2015 06:57
Fragile Parser
typealias C = (Int, Int)
typealias P = Int
typealias N = Int
typealias T = String
typealias Source = Dictionary<P, Box>
func ==(lhs: C, rhs: C) -> Bool {
var ((lx, ly), (rx, ry)) = (lhs, rhs)
return (lx == rx) && (ly == ry)
}

Catalog and Workflows

A Catalog describes functions, ins & outs of the workflow. So, in order to have a workflow, we need catalog.

A catalog is a vector of maps which must be compsed with onyx keywords :onyx/name, :onyx/plugin, etc.