Profile

Cover photo
Santiago L. Valdarrama
Works at Levatas
Attended University of Camaguey
Lives in Florida, United States
307 followers|590,258 views
AboutPosts

Stream

Santiago L. Valdarrama

General Discussion  - 
 
I'm sorry I missed last weekend's programming challenge. I was on vacation and away from a computer (which was great!) I'll also be absent next weekend since I'll be traveling to Cuba, so I apologize in advance.
20
1
Devendran R's profile photoNuno Gonçalves's profile photoVasilis Naskos's profile photoAhmed Shaheen's profile photo
6 comments
 
An elegant recursive approach http://nask00s.tk/towers-of-hanoi/
Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
Here is my solution to last Sunday's programming challenge about finding the position of an element in an array (You can read the challenge here.)
7
1
Daniel Jour's profile photoARJUN J's profile photo
 
I have a suggestion for the binary search: With a very large array, one could assume an near equal distribution of the numbers. Then, instead of using the mid between start and end to narrow the search range it should be possible to calculate a guessed position:

scale = (target - arr[start]) / (arr[end] - arr[start])

divideAt = start + scale * (end - start)

Since there are no duplicate values I'd guess that aforementioned assumption holds most of the time.
Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
Think for a second how do you always try to solve a particular problem. To oversimplify this, I'm going to divide it in two different groups:
21
5
Shaun Mangelsdorf's profile photoHisham Mounir's profile photoHuitzilihuitl Ceja Jiménez's profile photoYasmin Lemus's profile photo
4 comments
 
Experience goes a long way in knowing what sorts of messes are easy to clean up later and what kinds of messes are actually deep holes that require a massive rewrite to fix. Good design patterns become habits.
Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
Let's try something simple this week (because it's Memorial Day week. I promise to rise the bar next week):
5
Oliver Foggin's profile photoMarwan Burelle's profile photo
2 comments
 
It's a binary search. The trick in order to get the insertion position is the way you manage the bound: what you want is the first not inferior value, thus when splitting the range, you keep the median point in the new range if it's the upper bound. 
Add a comment...
 
The Google App Engine Pipeline API connects together complex workflows (including human tasks). The goals are flexibility, workflow reuse, and testability.
11
2
Daniel Salmerón Amselem's profile photoTom Wu's profile photo
Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
Given a collection of intervals, write a function that merges all overlapping intervals and prints them out.
7
1
Federico Pedemonte's profile photoRobert Scullion's profile photoSantiago L. Valdarrama's profile photoТимур Мухамеев's profile photo
7 comments
Add a comment...
Have him in circles
307 people
Yassert Suarez's profile photo
Rafael Nieves's profile photo
In Motion Studio Design Inc's profile photo
Mario Palacios's profile photo
William Woody's profile photo
Yanluis Ulloa's profile photo
Lisandra Docampo's profile photo
Rainer Gonzalez's profile photo
Virender Verma's profile photo
 
These are based on my own experience as a developer and what I've heard and seen from other people working with me.
3
1
Pete Heard's profile photoSantiago L. Valdarrama's profile photoHabib Jalili's profile photo
2 comments
 
The idea is that having overlapping tests is a signal that something can probably be improved. I don't think that you can get rid of overlapping tests every time for a complicated enough system, but if you keep getting multiple failing tests with every error, it's a good idea to look into it.
Add a comment...
 
Think for a second how do you always try to solve a particular problem. To oversimplify this, I'm going to divide it in two different groups:
7
Paul Belevtsev's profile photo
 
Both options have right to exist. The second option is actually faster, solve the problem and show a working prototype. But in the long run, for a flexible system, without first variant, project become a real pain and cemetery of unnecessary functions.
Add a comment...
 
Think for a second how do you always try to solve a particular problem. To oversimplify this, I'm going to divide it in two different groups:
20
5
Alexey Tomin's profile photoLevente Varga's profile photoDaniel Davidson's profile photoTomasz Nowak-Bańdura's profile photo
2 comments
 
+Ernest Pazera​ you totally misunderstood the entire post.

Who's checking in code? What production code are you talking about?

You said that you have never seen what again?

Not sure what junior developers have to do with anything?

Sorry.


Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
Here is my solution to last Sunday's programming challenge about merging overlapping intervals (You can read the challenge here.)
20
2
Phil Hibbs's profile photoJean-David Moisan's profile photomia zuffler's profile photoTi Else's profile photo
7 comments
 
It's really funny to see this as I had to solve something really similar but with angle ranges instead. And since they are angles, the ranges looped around which made for an interesting problem to think about.

I managed to come up with a pretty elegant solution by adding each interval one by one to a single dimension sorted list. (Keeping in mind that the opening value could very well end up at the end of the list since a range such as [350, 20] can exist when intervals loop around.)

Then it's only a matter of removing all the indexes between the intervals that you are adding. (If the opening value or closing value itself is within an other existing interval, simply don't add it, but still remove everything between the indexes where it would have been added.)

Now the cool thing with this is that based on how you break the intervals back out of that list, your code will either have added, or removed intervals.
Example:
[1, 4] [2, 5] -> [1, 5] or [5, 1]

Or with more:
[1, 4] [2, 5] [6, 9] - > [1, 5] [6, 9] or [5, 6] [9, 1]
Add a comment...

Santiago L. Valdarrama

Shared publicly  - 
 
(The following is part of a documentation repository we are creating internally at my company to help onboard new team members on different technical areas.)
2
1
Romin Irani's profile photo
 
Very useful. Thanks for the collection.
Add a comment...

Santiago L. Valdarrama

General Discussion  - 
 
I believe pair programming is great. I've been doing it for more than 10 years and I firmly believe that it's helped me become a better engineer. (Night after night coding with somebody better than me paid off for sure.)
10
Chinmaya Agarwal's profile photoRob Weaver's profile photoPaolo Bolzoni's profile photoSantiago L. Valdarrama's profile photo
4 comments
 
+Paolo Bolzoni​ agreed. I'm working hard on it.
Add a comment...
People
Have him in circles
307 people
Yassert Suarez's profile photo
Rafael Nieves's profile photo
In Motion Studio Design Inc's profile photo
Mario Palacios's profile photo
William Woody's profile photo
Yanluis Ulloa's profile photo
Lisandra Docampo's profile photo
Rainer Gonzalez's profile photo
Virender Verma's profile photo
Work
Occupation
Engineer Manager
Employment
  • Levatas
    Engineer Manager, 2010 - present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Florida, United States
Previously
Camagüey, Cuba
Links
Other profiles
Contributor to
Story
Tagline
Software Engineer
Introduction
I work as an Engineer Manager at Levatas, and specialize in building scalable and fast enterprise software applications.
Education
  • University of Camaguey
    Computer Science, 1999 - 2004
Basic Information
Gender
Male
Looking for
Networking
Birthday
June 26