bloc referral

If you are interested in learning to code with a mentor, try bloc and get $100 off.

Wednesday, July 23, 2014

Data limit reached

Did you you know that a string can only hold 255 characters?

My job in the few days was figuring out some of the simpler errors within the application. It was an been an amazing practice since it help me in better understanding the project as a whole and what it does.

When I was first given this challenge on my second at work I quickly Googled for the answer and surprised on how easy it was to find it on Stack Overflow. SQLite3 is pretty lenient with its data, so I am not sure if I would of seen this error before, but I have also never dealt with live data in a production situation.

I discovered that some Facebook profile urls were causing the Sidekiq to throw an error. For whatever reason some were coming in over the 255 character limit for a string. The quick fix was to switch the column in the database over to a text field without a limit.








I felt pretty proud when I discovered the fix for this on my own and that I remembered how to do this. from my practicing prior to the job.

If you are creating a new table or reviewing an old, think about the data to be received and if there is a possibility for the data to exceed the limit of a string, 255 characters.




No comments:

Post a Comment