We had our first tech talk last last week! Our first was speaker, Caleb Doxey, a developer at GNIP and author of Introduction to Programming in Go. Caleb spoke on the Secrets of Go. Next was Tom O’Neill, CTO and co-founder of Periscope. Tom spoke on the Secrets of SQL. Lastly, was our very own Harry Noble, lead Android developer at SendHub. Harry spoke on the Secrets of Android.
If you missed our tech talk and don’t want to miss the next one be sure to join our Meetup group.
A while back we released the SendHub Manager App for Android which allowed managers to add and remove phone lines, and keep track of all their company usage. Today we’ve added the ability to log in to the SendHub app on any of your phone lines with the click of a button.
Until now, the SendHub Android app was used primarily by a single user at a time, with logouts and logins being relatively rare. User sessions were handled by simply downloading all of a user’s data when they logged in and clearing it when they logged out. This process was time consuming, data intensive, and not up to snuff for users who wanted to quickly log in and out of multiple accounts.
We hold all user information in a SQLite database, so given that we needed to persist data in order to keep session switches short we came up with two possible ways to handle this:
1. Add a userID column to all our tables and store all users information in the same table.
2. Create a new table for each user and switch between these at login/logout.
We went with option two for several reasons. First, we want to keep our queries fast, and using multiple databases means we will already have only the subsection of user data that we might need available at any time. Second, we want to keep the app to as small a storage footprint as possible and it is much easier to remove an entire database if it hasn’t been used in a while than to select specific data out of a larger database. More importantly, this was the option that required the least amount of change with our existing code. There is no need to rewrite queries or add new migrations; all we had to do was swap out the database as the user changed.
The basic implementation was straightforward: since we use a singleton for our database helper anyway, we simply added a bit of logic to getInstance() to make sure the correct database was returned.
The code above is a typical implementation of a singleton getter with two additional pieces. If there is no userId for the session we don’t create a database because no one is logged in. If there is a user ID, then we check if the current DatabaseHelper is attached to any database that does not match the user ID. If the IDs don’t match we simply close the old database and create a new DatabaseHelper with the correct user ID.
This is a quick way to add multiple user sessions to an app, but keep in mind it also requires code for cleaning up old databases and preventing long running processes from dumping data into another users database. Wanna check it out? Download the SendHub Manager App today and let us know how it’s working for you!
SendHub had an awesome holiday party last night. It included good friends, good food, and good gifts. Thank you to everyone who came and helped prepare the event!
Check out all our photos on Facebook.
We’re having our first tech talk on Wednesday, December 11th! Sign up here. Learn about the secrets of Go, SQL and Android from some great speakers:
Caleb Doxsey - Secrets of Go (20mins + Q&A)
- Caleb is the author of An Introduction to Programming in Go
Harry Glasser - Secrets of SQL (10 mins + Q&A)
- Harry is the CEO of Periscope
Harry Noble - Secrets of Android (10 mins + Q&A)
- Harry is an Android engineer at SendHub
Free pizza and drinks!
Spots are limited so sign up soon here.
Do you want to know more about the latest tech trends? Are you looking to improve your business phone system? Then join us at TwilioCon next week!
TwilioCon 2013 is this September 17th through 19th in San Francisco, and we’re going to be there! Join us at the conference for software people – developers, decision makers, and entrepreneurs – who are building the future of communication.
TwilioCon will include inspirational and technical sessions with incredible speakers from various industries and companies like Zendesk, Parse, and Google. They will talk about their best communication practices, technology trends, driving real business results, and creating customer interactions with new business processes. Specific topics will include how to strategize your API, reinvent customer engagement with SMS, handle data at a massive scale, and even hack in the physical world.
We will be at our booth in the Community Hall throughout the conference along with many other DOers from the community, including developer evangelists and innovators, so don’t forget to stop by! Make sure to stick around in the evening Wednesday, September 18th for the Hacker Olympics, which is both a spin on the regular hackathon and a tournament filled with exciting challenges.
If you haven’t bought your tickets, be sure to get them before they sell out. We have a 25% discount promo code [SendHub_VIP] on TwilioCon tickets for our community.
We’re excited to be sponsoring TwilioCon and hope to see you all there!
Have you Heard? Now your company can add as many phone lines as you need… for free!
SendHub now offers free phone lines for all of your co-workers. We make it as simple as we made signing up in the first place. Why do we give you a free phone number? We asked our customers what we could do to make SendHub easier for them and effective for their business. They told us that being able to manage phone lines and add accounts, without worrying about fees, would do the trick. So we made it happen— you can now setup the entire phone system for free.
How does it work? Simple. A manager invites their coworkers and they sign up individually on the web. They can add themselves to the phone system in seconds that connects them to their manager and other co-workers. Say ‘Goodbye’ to the notorious second cell phone you had to lug around for work.
Your account is completely flexible so you can add or delete lines as your business needs change. As the administrator of an account, you have control over all of these accounts. We want to help you improve your company’s internal and external communication system by making SendHub as convenient for you as possible.
Be on the lookout for more upcoming features, including MMS. If you want to be among the first to know about our new features and releases, text “MMS” of “Features” to the number, 6508305662, to receive about all of our updates straight to your phone.
Hey! My name is Khalia Braswell and I’m from North Carolina. I came out to Silicon Valley with my CS degree to work for SendHub!
Interning for a Start-Up is very rewarding! There is always a task to complete and a lot of room to make your mark. In order to get the most of a Start-Up internship, I would suggest the following:
Don’t be afraid to ask questions
People always say “there is never a dumb question”; however, when you are joining a team for the first time, anxiety can occur when it comes to asking a question. After getting past this fear, I realized that asking questions would allow me to be the most productive. It also increases my knowledge. Asking questions at SendHub often leads to me learning more than I ever expected. In this short time I’ve learned more about our product, API’s, and different applications that help make our business run.
Talk with the customers
Being able to interface with SendHub’s customer base has increased my passion to do work. We always strive to make our customers happy and listening to their needs drives me to complete tasks. For instance, while on chat support, I was able to help a customer who had issues uploading their contacts using a .CSV file. I instructed her to send it to me so that I could fix it for her. After I solved the problem, we set up a phone call so that I could walk her through how to edit the file in the future and upload the contacts herself. She was very pleased that I took the time to help her and it made me feel like I added value to our brand.
Food for thought: Every experience is a learning experience. Although I have a Computer Science background, I was very open to working with the Sales/Support team at SendHub. It has allowed me to increase my customer service skills and emphasize the importance of building strong customer relationships. In addition to being flexible about the type of work you may have to do for a start up, you have to be flexible about your projects. You may be assigned to a project that could get changed multiple times before the final product is completed. Things happen FAST at start-ups so you have to be willing to roll with the punches.
As my internship at SendHub comes to a close, I can reflect on all that I’ve seen and absorbed while here and say that I have thoroughly enjoyed my time here at SendHub. Being able to talk with our Co-founders has been the most rewarding. I tend to learn a lot from them about various things and I think it speaks a lot to the start-up culture.