4,210 reputation
21328
bio website memmove.blogspot.com
location Charleston, SC
age 28
visits member for 2 years, 9 months
seen 13 hours ago

I am a Software Development Engineer with Amazon.com. I have extensive experience with object-oriented programming in C++, JAVA, and C#.NET. Also, I have done a great deal of work with relational databases and embedded development.

If you would like to contact me for any Software Engineering related question, feel free to shoot me an email at jonathan.michael.henson@gmail.com


Jan
5
comment Good design pattern for a c++ wrapper around a c object
@Phillip, that looks like exactly what I need. I'll try this and get back with you.
Jan
5
comment Good design pattern for a c++ wrapper around a c object
This does not address the problem, unless I just badly misunderstand smart pointers. The problem is that sometimes, my destructor should clean up the memory, other times the c-library cleans up the memory. These structures have special init, free functions. The library may call free on its own, before the reference count of the smart-pointer hits 0. I need to basically decide ownership and let it go. I don't need a smart pointer to know when to clean up the memory, the problem is that sometimes, I am not the one responsible for cleaning it up and I need to not free it in the destructor--ever.
Jan
5
comment Good design pattern for a c++ wrapper around a c object
@ratchetfreak All the wrapper does is call the accessor/mutators, ensure good copy semantics, handle memory, copy lists etc... I do not actually directly touch the data. The c-library is thread safe already. Also, my users will only have access to my wrappers synchronously with the system of callbacks and so on. Where necessary, I have locks on reads/writes to any data.
Jan
4
revised Good design pattern for a c++ wrapper around a c object
added 528 characters in body
Jan
4
asked Good design pattern for a c++ wrapper around a c object
Dec
11
comment I failed FizzBuzz, would you hire me?
Certainly any interview question is whatever the interviewer wants to use to evaluate the things they are interested in. My point is that FizzBuzz is a very poor question for evaluating anything other than, "Can he/she write correct code quickly?" It is not really technically challenging enough to gauge critical thinking skills. If someone seriously gets hung on this question, do you even want them on your team? It's like hiring an Engineer that can't do basic calculus. While everyone wants to make sure the Engineer knows his basic Calculus--it is really non-negotiable that he does.
Dec
7
comment I failed FizzBuzz, would you hire me?
While I agree with this as a basic interview goal, this is not the point of fizzbuzz. Fizzbuzz is gauging one thing and one thing only. Can you write simple code quickly and correctly? Usually interviewers want this question done in less than 2 minutes. That isn't everything, I know, but that is what the question is designed for.
Dec
7
comment I failed FizzBuzz, would you hire me?
@ja_programmer well fizzbuzz is an exercise in speed. You are supposed to complete it in less than 2 minutes. They are not testing your problem solving abilities, just your flat out ability to write simple code quickly. Also I have been asked "Do you see any problems with this code?" when the code was completely correct and they were just trying to gauge my confidence or piss me off--haven't decided yet.
Dec
7
revised I failed FizzBuzz, would you hire me?
added 159 characters in body
Dec
7
revised I failed FizzBuzz, would you hire me?
added 12 characters in body
Dec
7
revised I failed FizzBuzz, would you hire me?
added 12 characters in body
Dec
7
answered I failed FizzBuzz, would you hire me?
Nov
16
revised Implementing the transport layer for a SIP UAC
added 429 characters in body
Nov
15
comment Implementing the transport layer for a SIP UAC
Ok, but suppose, like in an Invite Transaction, the server will be sending multiple responses, and the client will send multiple requests, but they are not the typical one response for each request, or in order.
Nov
15
comment Implementing the transport layer for a SIP UAC
But that would cause the Client to block waiting on a response, and doesn't that break the "STATELESS" rules?
Nov
15
revised Implementing the transport layer for a SIP UAC
deleted 1 characters in body
Nov
15
revised Implementing the transport layer for a SIP UAC
deleted 1 characters in body
Nov
15
comment Implementing the transport layer for a SIP UAC
Not that part. Here is the problem. I create a socket to send the request on and send it. Now here is the question. Do I wait for a response on THAT socket (like in TCP communications) (i.e. a call to ::read(SOCKET...), or do I close the socket and forget about it trusting that the TCP or UDP Listeners will receive the response?
Nov
15
comment Implementing the transport layer for a SIP UAC
thanks for answering. However, I know that much, I want to know the specifics about the Client/Server model as to how which elements are responsible for sending requests / receiving responses. The UAS portion is easy, it is just the UAC that is confusing me.
Nov
15
comment Implementing the transport layer for a SIP UAC
@PeterK. No, I am not implementing TCP or UDP, just using it. By transport I mean creating the Client and Server Sockets, and sending and receiving the data, and then passing the data to the transaction layer.