HNHacker News
TopNewBestAskShowJobs

professorTuring

335 karma · joined February 13, 2013

Cybersecurity
submissionscomments
professorTuring··on Catching an iPhone mugger without iCloud
This is crazy but it might work:

1. Start talking about a prize you won, something like "Remember that radio show I called? Well, finally I won the macbook pro contest".

2. Set up an environment where you have to go somewhere but you simply can't so your friend needs to ask a favor to show up at "blablabla" and show "this code" in the name of "Blablabla". Another friend of yours should say "ok, I'll go".

3. Talk about when they are at the "public place" the day X from 10 to 12", your friend talk about he won't be able to arrive earlier than "11:30".

Give all the details like "I have already talked to them, and I have told them that my friend is going to pass by to get the iPad and that they only need to show the code in his mobile. Anyway, they are going to be there from 10 to publicite whatever...".

Just wait from 10 to 12 that day at that place, bonus points if you print some "radio t-shirts" or something...

professorTuring··on Ask HN: Freelancer? Seeking freelancer? (May 2014)
SEEKING WORK - Remote - Security Consultant If you don't want to appear in the front page due to you security problems, just hire me. I will help you in your security design, processes, procedures, ERP, DRP, compliance, key management, PCI-DSS... I will walk with you and I will enable you to achieve your goals in a secure way. I don't overkill just smart security for your business. Just drop me a line to my e-mail or answer me here.
professorTuring··on How Should You Write a Fast Integer Overflow Check?
Definitely.

Child, this is why I always add unit tests.

professorTuring··on How Should You Write a Fast Integer Overflow Check?
Ok this is my dumbest time in life xD (I just directly didn't take into consideration that part because it never has overflow...)...
professorTuring··on How Should You Write a Fast Integer Overflow Check?
Ok, I think this should do the trick:

return((a ^ b) | (a ^ (*rp)) < 0) ? 1 : 0;

doesn't it?

professorTuring··on How Should You Write a Fast Integer Overflow Check?
I might be missing something, but I have tested it and it gives me "0" and no overflow.

edit: Ok, I do missed one spot (my mind tricked me), the answer shouldn't be 0.

professorTuring··on How Should You Write a Fast Integer Overflow Check?
EDIT 2: Editing...

EDIT 1: as spotted by @pbsd this was not working good with some values...

I have added a way of checking the overflow and I have tested it:

  #define BITS (8*sizeof(int))-1

  int checked_add(int a, int b, int *rp)
  {
      *rp = a+b;
      
      return (a^b) < 0 ? 0 : (a^(*rp)) < 0  ? 1 : 0) ;
  }
It is around 30% faster than the fastest in the blog and I believe the code is way cleaner. What we are doing is checking if all of the values has the same sign (the "^" is just a "xor"), if so, no overflow in other case, overflow.

This is the testing program (g++ compliant):

  #include <stdio.h>
  #include <time.h>
  #include <stdlib.h>

  #define BITS (8*sizeof(int))-1

  int checked_add2(int a, int b, int *rp) {
    uint ur = (uint)a + (uint)b;
    uint sr = ur >> (BITS-1);
    uint sa = (uint)a >> (BITS-1);
    uint sb = (uint)b >> (BITS-1);
    *rp = ur;
    return
      (sa && sb && !sr) ||
      (!sa && !sb && sr);
  }


  int checked_add(int a, int b, int *rp)
  {
      *rp = a+b;
      return ((a^b) | (a^(*rp)) < 0)  ? 1 : 0 ;
  }


  int main(int argc, char* argv[])
  {
      int a, b, c;
      long clong;
      srand(time(NULL));


      for(unsigned int i = 0; i < 50000000; ++i)
      {
          bool overflow = false;
          a = rand();
          b = rand();
          clong = (long)a + (long)b;

          overflow = checked_add(a,b,&c);

          if(clong != (long)c && !overflow)
              printf("Overflow not detected %i + %i = %i \n", a, b, c);

      }

      return 0;
  }

Time for "checked_add": 2.694s

Time for "checked_add2": 3.200s

This is the dump (6 instructions so far): http://goo.gl/cnBKdS

professorTuring··on Security for startups
We don't want to provide only "consultancy", we provide actual technical work. But what we really provide is an easy and affordable way to start thinking in security and bringing it into your day to day, from decision making to your SDLC.

If an StartUp actually need technical work to be done, we can provide it as well, or, if it really need a big amount of security work to be done we will work with them to keep a track that fits the enterprise.

Also, we really believe security adds traction and sexiness to StartUps since more and more users have a better security consciousness and they want their services to be secure as well.

professorTuring··on Security for startups
Clickable link:

http://www.kibytes.com

professorTuring··on Ask HN: Freelancer? Seeking freelancer? (April 2014)
SEEKING WORK - REMOTE - Security Consultant

I would like to help your enterprise with your security concerns. I will help you in your security design and analysis, processes, procedures, ERP, DRP, compliance, key management, PCI-DSS...

We will walk together and I will enable you to achieve your goals in a secure way. Just smart security for your business. I can work with you hourly based or project based.

Just drop me a line to my e-mail or as an answer here.

professorTuring··on Ask HN: I need your help. Trying to develop secure and anonymous email
A question: have you hired a security consultant to review your procedures and processes? or, are you yourself a security expert?

I mean, do you know that a secure mail is much more than encryption and public-private key? You really need to have your service security reviewed.

professorTuring··on Ask HN: Freelancer? Seeking freelancer? (March 2014)
SEEKING WORK - Remote - Security Consultant

If you don't want to appear in the front page due to you security problems, just hire me. I will help you in your security design, processes, procedures, ERP, DRP, compliance, key management, PCI-DSS...

I will walk with you and I will enable you to achieve your goals in a secure way. I don't overkill just smart security for your business.

I can work with you hourly based (do you want me to review some technical documents or code? ) or project based ( you just need some security documents, design... ).

Do you want to pentest your platform?

Just drop me a line to my e-mail or answer me here.

professorTuring··on The programming error that cost Mt. Gox 2609 Bitcoins
Dear software engineers working with money or crypto: hire security consultants. Pay them with your favorite cryptocurrency.
professorTuring··on Offer HN: Improve and show your skills by working with a NPO/NGO
Great! I will =)
professorTuring··on Offer HN: Improve and show your skills by working with a NPO/NGO
Ok, let me add that since we are both an NGO and an NPO.
professorTuring··on Offer HN: Improve and show your skills by working with a NPO/NGO
I respect your opinion but we don't do that and we don't plan to.
professorTuring··on Offer HN: Improve and show your skills by working with a NPO/NGO
Clickable report: http://www.adelanteafrica.com/wp//wp-content/themes/Pilgrim/...
professorTuring··on I got fired after 2 weeks of being hired. Please help me understand something
That's a shame. Probably, the problem is that they are idiots. Rule 1: never ever fire a person without speaking with the person first an let him know what is wrong, give them a chance to explain themselves or to change the way they behave.

Two weeks is a very small period to train a person unless they were expecting (or your mislead them without intent) you to be an expert in the technology or similar and work from day one.

Or maybe they have found "a friend" and they prefer to hire another people and they have simply told you a lie. You will never know so don't let this affect you.

professorTuring··on I created this to help my son – maybe you know someone that could use it
This is so great and sad at the same time.

It is great because you have shared an application that could be useful to a lot of parents. It is sad because you have stolen some parent-time from children.

professorTuring··on Tesla expands Supercharger Network in Europe
I can remember a video (though I can't find it) where Top Gear (or a program like that) compares a Cayenne vs a diesel small car in a travel.

They had to travel from one city to another (using autobahns) and arriving as fast as they legally can and they will take cost, time and comfort considerations.

I won't spoil which one wins just in case you find the video =)

professorTuring··on Linux should be a part of School Education
So right, but you have to use "something" as example, I don't mind which one you prefer as long as it comes with a "how this affect my life" explanation.
professorTuring··on Linux should be a part of School Education
I believe almost everybody know that electricity can kill you and this is taught at school.

Evidently if you try to repair your TV (without knowing how to repair it), change the electrical installation of your house (without knowing anything), touching a high intensity cable or something like that it is a dead by accident or by stupidity.

professorTuring··on Ask HN: How can I encourage my co-workers to grow further as engineers?
This is not a how-to, but have a look at this (I have this very same problem): https://news.ycombinator.com/item?id=6920376

Now my teammates are completely in the path. Motivation is the key point here, they told me at the beginning "you have just arrived here, you will not be so "willing" when you have some years on your back". But then I showed them I am relentless I have showed the benefits of "doing" and "going further". How? I don't have a clear answer but I believe something like:

1. I study a problem or a path.

2. I try to speak about it to my boss (and I don't usually give credit to what he say since he a "1" type).

3. I do what I think it bets better to the enterprise/team

4. I show it to my boss and colleagues and speak about the issue/problem/technology...

5. They don't give a shit about it.

6. I continue my path (meanwhile they continue their path) until they realize that my path is simpler, funnier, better, or rewarding.

7. They usually want to meet again to "re-speak" about the technology/problem/issue... whatever.

8. They end up learning it and enjoying the path on learning/studying...

So nowadays they are motivated by this path (just a little bit more, old your horses!) but I notice that they are much happier.

But, a BIG WARNING: it might happens that some people may feel threatened about you or your way. When you finish something make them feeling part of the team, congratulate them and so on... This is so much true if you are not their boss (if you are, just fire them).

professorTuring··on Linux should be a part of School Education
Bullshit. Most people doesn't know a shit about electronics and they are surrounded with electronic equipment. And this is an example, there are a lot of things I don't know almost anything about them and I can successfully operate with them.
professorTuring··on Linux should be a part of School Education
There are thousands of applications that abstract normal people from the "HTTP". Knowing stuff is a great thing, but forcing people to learn stuff is something totally different.

Show kids how to build a webpage with HTTP and CSS and they will run for their lives. Maybe you can teach them how to configure any content manager making an effort in explain them how having a webpage can affect their lives and how can they prevent them (security, privacy...).

It is school guys, teach kids useful tools for their lives, don't bore them with hypes (I am purposely obviating the "brain" development thing).

professorTuring··on Linux should be a part of School Education
Teaching those topics at school is crazy. This is just "random stuff" for kids, completely nonsense.

We should teach "how" computers work (very basic principles) and maybe "how" communications work (very basic principles). And definitely we don't need to teach kids about HTTP... Maybe, and only maybe, we could teach them how a programming language can help them with their "math homeworks" and things like that...

professorTuring··on Ask HN: What is the best way to distribute an iOS app to Kickstarter Backers?
Be my guest =)
professorTuring··on Ask HN: What is the best way to distribute an iOS app to Kickstarter Backers?
What about the easiest way?

1. Add a low price for the first days, ie: 0,99.

2. Then tell a bunch of your backers that you want to give them 1$ via paypal or similar.

3. As you get responses and the application has been bought jump to the next bunch of packers.

4. Repeat.

5. When finish, raise the price you consider fair.

It will cost you around 30 cents * N. of backers and you will get a bit of traction from some early users thanks to the low price.

professorTuring··on Ask HN: How do I encourage women developers to join our dev team?
et voilá! Tu as trouvé la meilleur réponse.

This is the one and only response, you just find the best developers you can, and do not look at their genders. Only 10 out of 100 developers are females ( http://www.forbes.com/sites/lorikozlowski/2012/03/22/women-i... ).

But, also, it is difficult to find a great developer, let's say 1 out of 10. So you will need to interview, on average, 10 women for the position to find a right one, and when you reach 10 women for the interview, you will have 90 men.

It is just about the numbers.

professorTuring··on PingPal ChatApp – the iPhone chat app for groups that really work
Can you point me out what new features are you offering me with your product in comparison, for example, to WhatsApp, Line or Google hangouts?

Or, are you simply offering a new player into this market?

← PreviousPage 4 of 6Next →