archive-ca.com » CA » E » EVANJONES.CA

Total: 397

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Real bugs found by the Closure JavaScript Compiler (evanjones.ca)
    browser issues that our testing hadn t noticed yet Perhaps the most valuable part is that when we rearrange JavaScript files it finds duplicate or missing includes script tag references I found the Closure compiler annoying to get working however now that I understand how to make it work if I were to start a new large JavaScript project from scratch I would try to use it from the beginning Below is a summary of the bugs it found in our code Missing imports after code refactorings We have a number of rarely used utility pages that we tend to forget about The compiler never forgets Duplicate imports Not strictly a bug but it could cause problems if parsing and executing has side effects Missing event variable in event handlers 2 instances On Chrome window event is automatically defined so referencing a variable called event works but on Firefox this is a bug Example element addEventListener click function var data event target getAttribute data attribute Global variables being initialized twice in slightly different ways 2 instances This isn t really a bug but is extremely misleading when debugging Example var someMagicGlobal globalInit option default some other file var someMagicGlobal globalInit

    Original URL path: http://www.evanjones.ca/closure-compiler-bugs-found.html (2016-04-30)
    Open archived version from archive


  • Chrome's developer tools are a competitive advantage (evanjones.ca)
    has given me a renewed appreciation for the value of a good debugger It made me realize that good developer tools are a competitive advantage for platforms like web browsers Developers tend to use Chrome because it makes their job easier As a result web sites work best in Chrome and this encourages users to switch This is similar to Microsoft s strategy around Visual Studio make tools for internal

    Original URL path: http://www.evanjones.ca/chrome-dev-tools.html (2016-04-30)
    Open archived version from archive

  • Trouble with Transactions NE DB Summit 2014 (evanjones.ca)
    there is a opportunity for researchers and vendors to make significant improvements by making developers lives easier For users the database doesn t end at the TCP socket We need to focus on the APIs and admin tools that people actually interact with As a specific example I used to believe that transactions make programmer s lives easier so I spent my entire PhD working on systems with strong transactions

    Original URL path: http://www.evanjones.ca/trouble-with-transactions-nedb.html (2016-04-30)
    Open archived version from archive



  • Required reading: Unlocking the Clubhouse (evanjones.ca)
    of computing are still familiar 12 years later It made me realize that during my undergrad years there is a good chance that I was involved in creating some of the men s locker room culture the book describes I think I have become more socially aware as I ve gotten older so I hope I don t do that now If I do have please let me know However the book also shows that change is possible and doesn t need to take decades female enrollment went from 7 in 1995 to 42 in 2000 in large part due to changes that were put in place during this study This is a subject that has been actively discussed on the Internet in the past month since The Information interviewed Paul Graham of Y Combinator and discussed discrimination against women Valleywag follow up Paul Graham s response Co incidentally I ve been talking to many of my female friends in computing since I attended a Google Ventures event that had pretty close to zero women I read this book because it was frequently recommended I m not sure I have anything to add to this discussion that others have not

    Original URL path: http://www.evanjones.ca/unlocking-the-clubhouse.html (2016-04-30)
    Open archived version from archive

  • Google Apps Directory API: Unofficial guide (evanjones.ca)
    should you use the primary email address and ideally also their name and user photo You can get a photo from the thumbnailPhotoUrl property which is easier than using the Users photos API If someone can select a user by email address for example by typing an address in a share with dialog box you should pull all the aliases from the aliases and nonEditableAliases lists and match any of them Google Apps user names are case insensitive e g User example com and useR example com refer to the same inbox However the primary email address returned by Google can contain uppercase or lowercase letters exactly as it is entered in the Google Apps control panel Unlike Gmail dots are treated as part of the user name see character usage and limits Google Apps Groups Unfortunately Google Apps groups are really a list of email addresses which means they are flexible but have some weird corner cases When Google figures out that an email address points to a group or a Google Apps account it magically matches that group member record to the user group However because the group members are just a list of email addresses groups can contain aliases non existent accounts and external addresses Like user accounts groups have a primary email address and aliases It is not currently possible to change the group s primary email address through the UI It may be possible through the API but I haven t tried Google Apps user members Group members that refer to a Google Apps account have type USER and an email address If the email address resolves to a user account considering all aliases and domains then the id matches the user id from the domain list The email address can be any of an account s aliases and not necessarily the primary email address so again don t match members using email addresses If the user is renamed or deleted the group entries are automatically renamed or updated as needed Group members Groups have type GROUP and an email address As with users the address recorded here could be an alias and not the primary address so use the id to map it to the correct group Unknown email address members Arbitrary email addresses can be added to a group This address could be on a domain that is owned by this Google apps account e g baduser yourdomain com or an external domain You can detect this case because the id will not match any user accounts Each unknown email address is assigned a unique id that never seems to change If the address is added to multiple groups or if the address is deleted from all groups and re added it always has the same id even if the address temporarily was used by a valid Google account Google does not look at domain aliases when determining these ids For example if example com is an alias for yourdomain com then baduser

    Original URL path: http://www.evanjones.ca/google-apps-api-guide.html (2016-04-30)
    Open archived version from archive

  • Dependency injection and Guice in two minutes (evanjones.ca)
    complicated set of objects Frameworks like Guice and Dagger automate part of this process You configure the specific types you want then the framework will create all the dependencies However you don t need to use a framework to use dependency injection My suggestion pass objects you need to replace in a unit test into an object s constructor Good candidates are databases web requests or any external state Bad candidates are simple value objects that bundle together related variables or objects where the unit test would pass in the same thing as the application If you follow this rule you are using dependency injection Longer than two minutes Opinions about Guice I ve recently been exposed to Guice and found it very confusing Part of the problem is that I m a framework hating luddite and distrust magical code Guice unfortunately magically figures out how to create your objects For example the Guice Getting Started page creates a service using RealBillingService billingService injector getInstance RealBillingService class When is the RealBilling Service created What dependencies get passed in Once you understand Guice you know to look at the Module bindings However this is not normal Java code and hence I consider it magic Another reason for my confusion is that the Guice user s guide explains how to use Guice and not why it is helpful to build applications this way If you are also a low level luddite who likes to understand the internals of your tools the most helpful source I found is do it yourself dependency injection DIY DI Chad Parry explains how dependency injection makes it easier to write tests and shows how to write it without a framework Not only is this useful by itself it helped me understand how and why Guice works the

    Original URL path: http://www.evanjones.ca/dependency-injection.html (2016-04-30)
    Open archived version from archive

  • Yext's build system ICBM: An example of "worse is better" (evanjones.ca)
    regular expressions When I first heard this I immediately thought this was a disgusting hack However after listening to the rest of the talk and thinking about it a bit I ve decided this is actually an elegant hack and a perfect example of worse is better design Parsing imports from Java source code using regular expressions is not correct and I can produce code where ICBM won t find the right dependencies However real code that doesn t work should be exceedingly rare For Yext any cases that don t work can be fixed since they own the code it needs to build As a result ICBM avoids a ton of complexity and is probably faster to boot The other interesting feature is that ICBM builds single jar executables This means all code and dependencies are in a single file which makes deploying and rolling back very easy I m always happy to see others adopting this approach since I think it is the right way to deal with servers We do this at Mitro using a quick and dirty script I hacked up Dropwizard advocates using fat jars built by Maven Shade Go produces statically linked binaries for

    Original URL path: http://www.evanjones.ca/yext-icbm-build.html (2016-04-30)
    Open archived version from archive

  • Mitro: No longer stealthy (evanjones.ca)
    I guess this means we are no longer in stealth Mitro allows people to share passwords with others in a secure way We became interested in this problem after talking to a bunch of organizations about how they use cloud services and discovering that inside nearly every organization there is a shared document with a bunch of passwords to a bunch of shared accounts and that when groups get larger

    Original URL path: http://www.evanjones.ca/mitro-no-longer-stealthy.html (2016-04-30)
    Open archived version from archive