tag:blogger.com,1999:blog-115933742024-03-13T10:03:42.448+00:00Andrew Beacock's Blogeng mgr / leader / full stack / java / agile / tdd / security / aws / goAndrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.comBlogger255125tag:blogger.com,1999:blog-11593374.post-32593430406544871662020-12-28T23:05:00.004+00:002020-12-30T14:57:35.362+00:00Physical meetups transition to online webinars in 2020<p> Prior to the UK lockdown in March I was pretty active <a href="https://blog.andrewbeacock.com/search/label/Meetup">attending various tech meetups</a> in the north west, we were even in the final stages or preparing for hosting the first <a href="https://www.meetup.com/Liverpool-Tech-Meetup/">Liverpool Tech Talks</a> scheduled for the end of March. Obviously that was cancelled as the pandemic was taking hold in the UK and all face-to-face meetups have been cancelled ever since.</p><p>I knew quite a few of them went online to become virtual meetup events but for me a large part of attending the meetups is for the social side, the pre and post discussions with the speakers and other attendees. I attended a few as a spectator and found them good but not as good as the real thing but something that I was interested in was being a panelist so that I could be part of the discussion.</p><p>Luckily for me <a href="https://theverygroup.com/">The Very Group</a> are active in the 'early talent' area, and have great ties with the University of Liverpool. Our early talent partner reached out to ask if my awesome colleague <a href="https://www.youtube.com/channel/UCMz9lmndR0BEqi70kM_ioyA">Ben Kadel</a> and myself would be interested in hosting a session in November as part of the university's ConnEXPO 2020. We decided to do a joint 30-minute session on “Importance of Personal Brand”. Unfortunately it wasn't recorded so I can't link to it here.</p><p>Shortly after I was asked by <a href="https://www.maxwellbond.co.uk/">Maxwell Bond</a> to be part of a 3-person panel on their <a href="https://www.maxwellbond.co.uk/blogs/events">Trusted Tech Talks</a> event/podcast on “Remote Collaboration & Pair Programming”. Having worked remotely for over a decade for a previous company and then helping Very to go remote in March it was right up my street.</p><p><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/pUGiuvW54BA" width="560"></iframe></p><p>Then to finish off the year I was contacted by <a href="https://www.linkedin.com/in/datadrivenpodcast/">Lewis Adams-Dunstan</a> host of Preparing the Unprepared podcast to discuss “The Responsibilities of a Technical Hiring Manager”. As an engineering manager I consider hiring one of my most important tasks and Lewis also shares this view. We had an excellent hour-long conversation about hiring and onboarding and I thoroughly enjoyed it.</p><p><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.linkedin.com/video/embed/live/urn:li:ugcPost:6747542327666982912" title="Embedded post" width="560"></iframe></p><p>These webinars round out what has been the very strange year of 2020 but I'm already lined up to be part of a couple more webinar discussions early 2021, and hopefully can soon be speaking to people face-to-face in real life!</p>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-45925944750918416952020-03-17T08:14:00.000+00:002020-03-26T10:28:15.154+00:00Remote working - How to stay sane<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoQ67yfucXvY7N51mOMsllhyXg8G89M_r1cpC-vDduBo2dWv9AZl5WHW49EHs4wWQ-TCp-xb_CFXXA3UnUaw5TAobw_As7nbhQ1gWCBCeYAS1mkXcOhq-q0f688CXy2E7sm0U-lg/s1600/IMG_20200326_083858515.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoQ67yfucXvY7N51mOMsllhyXg8G89M_r1cpC-vDduBo2dWv9AZl5WHW49EHs4wWQ-TCp-xb_CFXXA3UnUaw5TAobw_As7nbhQ1gWCBCeYAS1mkXcOhq-q0f688CXy2E7sm0U-lg/s320/IMG_20200326_083858515.jpg" width="320" /></a></div>
Up until the start of this year I'd been working 100% from home for over a decade as a remote software developer. The key to staying sane whilst never leaving your home? Not feeling isolated.<br />
<br />
It's great at first, longer in bed as you've no commute, you get to wear what you like, start preparing your evening meal at lunchtime, get some washing on, all of this whilst doing way more than you'd normally get done in a busy office.<br />
<br />
However all these 'great things' don't make up for the isolation. You send emails and IMs but don't feel connected. You wait for the phone to ring but it doesn't as you've no meetings that day. You wonder what your co-workers are up to but for some reason you struggle to pick up the phone.
<br />
<br />
Isolation (or 'cabin fever') hits ALL remote workers when they transition from an office-based job to 100% at home. Working at home one day a week is not 'working remotely'. Visiting the office three times a year is.<br />
<br />
So how do you get over this? You need IM/Skype/Slack/Microsoft Teams/etc. You need to be able to see your co-workers as little green dots of community! You now can 'see' who is in the office (green). Who is getting a brew (yellow). Who is off sick today (grey). You can even see when meetings are happening (red). The worst thing in the world is having the phone number of all of your colleagues but not knowing if calling them now will result in them answering. Just seeing those greens dots means that you know there are other people out there just like you.<br />
<br />
When the skype connection broke I felt completely cut off. I knew inside that I could just start calling people but without those little green dots I felt completely alone. Isolated. Cut off from the outside world. All alone.<br />
<br />
If you are thinking of asking your workforce to 'go remote', make sure you have a messaging system in place so that people can see the 'little green dots'. Slack is awesome, I prefer it over all of the others, but as long as it's got 'little green dots' you are good.
Also, remember the green dots mean that you know you have co-workers out there. Make sure you actually talk to them! Email or IM conversations do not count as talking, you need to pick up the phone/headset/etc. and actually verbally talk to someone each day. And not just about work. Ask them how they are? Are they OK? Everything going well? Can I help with anything?<br />
<br />
I realised that as a remote worker you don't get the coffee break chat, the water-cooler talk, the casual interactions that office workers take for granted, you as a remotee need to MAKE THESE HAPPEN. Call someone else up and chat to them about general stuff for five to ten minutes, you will feel better, and they will feel better – guaranteed.
With fast internet, laptops, VPNs and cloud computing, going 100% remote is easier than ever but that doesn't mean it's easy.<br />
<br />
The key to successfully being a remotee is communication. You MUST over-communicate and you MUST reach out to your other remotees.
So, get a good messaging system in place so people can see the 'little green dots', and ensure that everyone has the ability to easily talk to each other and that verbal communication is encouraged. It's the only way that you will be successful with remote working and that you and your co-workers will not become isolated.<br />
<br />
That is the key to staying sane remote working.
Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-27213698792674261232019-11-20T21:22:00.000+00:002019-11-20T21:22:22.998+00:00AWS User Group Liverpool - Things I wish i'd known about Lambda... and you should too!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUZg1P6WN91hPORFQkkJQROzzpkVMoqIVA-ZyZD7glW_3SpxvtR0b_QvANfvC6QOQCoG5dhK4zhR0Za4u5GKJlvXAMbtwNdWHYAgf0gceZ3XvNXMG7KrXk-TINjjJI_XEBvG7Eg/s1600/P1090800.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUZg1P6WN91hPORFQkkJQROzzpkVMoqIVA-ZyZD7glW_3SpxvtR0b_QvANfvC6QOQCoG5dhK4zhR0Za4u5GKJlvXAMbtwNdWHYAgf0gceZ3XvNXMG7KrXk-TINjjJI_XEBvG7Eg/s400/P1090800.JPG" width="400" /></a></div>
Last Thursday saw the seventh <a href="https://www.meetup.com/AWS-User-Group-Liverpool/">AWS User Group Liverpool</a> meetup in the wonderful <a href="http://thetapestry.co.uk/">Tapestry</a> building in Liverpool. <a href="https://www.meetup.com/AWS-User-Group-Liverpool/events/265925750/">This month's topic</a> was on <a href="https://aws.amazon.com/lambda/">AWS Lambdas</a> and lessons learnt from trying to use them for everything. There was twelve of us in total which was better than the five last month and due to the numbers and the informal setting some great conversation and topic discussions happened. It was great to see everyone chipping in with information and sharing experiences, really brings a great deal of value to these meetups rather than just presenters talking to the room.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Q3Q2xbtUN7A0ziM3MyP_WbwTFmD7cEL56QheJDVMRSyKMGLjMlTinDy96sWIHC0kB8TzTdbhFOT6WVb2ckpGbljzXDCMpcdD5nUgwWoI2z51J6rWUhTfg-sbou-2JNW5evGVgQ/s1600/P1090789.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Q3Q2xbtUN7A0ziM3MyP_WbwTFmD7cEL56QheJDVMRSyKMGLjMlTinDy96sWIHC0kB8TzTdbhFOT6WVb2ckpGbljzXDCMpcdD5nUgwWoI2z51J6rWUhTfg-sbou-2JNW5evGVgQ/s200/P1090789.JPG" width="200" /></a></div>
We started the evening with drinks and pizza and lots of conversation amongst the attendees. The Dominos pizza went down a treat as did the couple of cans of IPA.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTGs3BCVoM2ncxjv2zPM-9_X1KB2i-L2ZbzzSTa2LF4GHVITktxMe58ejmBgVBSUST7mLrZ1H_25qLboaKGmLPN5sU4fnRr9qgPy6TXONF6YfX8JSnARBrNujbzumPGp_z5jnffw/s1600/P1090792.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTGs3BCVoM2ncxjv2zPM-9_X1KB2i-L2ZbzzSTa2LF4GHVITktxMe58ejmBgVBSUST7mLrZ1H_25qLboaKGmLPN5sU4fnRr9qgPy6TXONF6YfX8JSnARBrNujbzumPGp_z5jnffw/s200/P1090792.JPG" width="200" /></a></div>
As always the evening started with "What's new in AWS this month" presented by Simon this month, which is actually a really good idea because Amazon are bringing out new components and services all the time and it's hard to keep up.<br />
<br />
A number of things were mentioned:<br />
<ul>
<li><a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Anomaly_Detection.html">CloudWatch Anomaly Detection</a></li>
<li><a href="https://aws.amazon.com/iq/">AWS IQ</a> - the first thing I thought of here was "security?" considering you are asking random people to help you with your AWS configuration problems and you need to give them access to your setup</li>
<li><a href="https://aws.amazon.com/savingsplans/pricing/">Savings Plan</a> - pay for your EC2 and Fargate usage on a 1 or 3 year commitment basis</li>
<li>AWS for WordPress is now available</li>
<li>Amazon API Gateway supports wildcard domain names</li>
</ul>
<div>
Next it was time to grab a drink and get ready for the main talk of the night.</div>
<div>
<br /></div>
<div>
<b>Things I wish i'd known about Lambda... and you should too!</b> - <a href="https://www.linkedin.com/in/des-webster-a4a05b197/">Des Webster</a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQOXK47jlxSM0Bmml0iye8VO_Uhi477YjvGAzEwAi1E9jL3q17TkeHnGNsuU9Qm90152HgwknojQ_zcziAbP9-mwqxTv3O5x0QbgDB_2QsivHBQrepnG1FFwy7piuzDSuiCClcg/s1600/P1090802.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQOXK47jlxSM0Bmml0iye8VO_Uhi477YjvGAzEwAi1E9jL3q17TkeHnGNsuU9Qm90152HgwknojQ_zcziAbP9-mwqxTv3O5x0QbgDB_2QsivHBQrepnG1FFwy7piuzDSuiCClcg/s200/P1090802.JPG" width="200" /></a></div>
Des works at <a href="https://www.linkedin.com/company/wearemago/">MAG-O</a> (Manchester Airport's technical division) and they have a focus on "serverless as much as possible". Des was tasked with proving if you could run a front-end web application on serverless and the talk was his adventure through this task.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjueATmPEZQrSZRFx8Nd1rv1M3E6hkQgoPH9OPGAVfC6XbomOPBXM5NyR_27V6-WKXALvzj3ptkOH_NNXxg6mz8sGp8cdGZZSaLAKghbXdww_vTvhg4XWDjNTjwqKUme5vy1YhDjg/s1600/P1090807.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjueATmPEZQrSZRFx8Nd1rv1M3E6hkQgoPH9OPGAVfC6XbomOPBXM5NyR_27V6-WKXALvzj3ptkOH_NNXxg6mz8sGp8cdGZZSaLAKghbXdww_vTvhg4XWDjNTjwqKUme5vy1YhDjg/s200/P1090807.JPG" width="200" /></a></div>
The problem with an end user-facing web application is that response time is extremely important, and serverless containers take a while to spin up from a cold start (anywhere from 0.5 to 1 second), once they are running they respond to subsequent requests pretty quickly.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG3HSoOayiNbxfQsQrU5ck1ivy-tU6x1c41mhAFTofsy8vjLCN9pu1FK7qN3gd190Rseo1F1nwAYDVZEjBrPDufTTBm7YDD3HF8FXLRasd6muDZi1tJVd8yNbrtug2PeJ5Py0ZoA/s1600/P1090808.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG3HSoOayiNbxfQsQrU5ck1ivy-tU6x1c41mhAFTofsy8vjLCN9pu1FK7qN3gd190Rseo1F1nwAYDVZEjBrPDufTTBm7YDD3HF8FXLRasd6muDZi1tJVd8yNbrtug2PeJ5Py0ZoA/s200/P1090808.JPG" width="200" /></a></div>
When are request comes in for a lambda which is not currently running, 'the function lifecycle' kicks in, downloading your code and the appropriate container to the sandbox on the guest OS, it kicks off the runtime and then starts your code. There are ways to get the lambda to fire up from a partial cold start or a warm start but they are up to you rather than something that is controlled by AWS itself.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDBODuRz6a9Gi7KULw3CwXv4BvRqHUW_2HZCjJCwbUBTvLP6OMTZGu8UqdlBE3bk-3hIbkcg2JRvHr8JUAmCRuoGVxrB2uYcr21U3_Y4RsOuZQFhTJ2eBBU0ka2rfun78qp_ebNg/s1600/P1090806.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDBODuRz6a9Gi7KULw3CwXv4BvRqHUW_2HZCjJCwbUBTvLP6OMTZGu8UqdlBE3bk-3hIbkcg2JRvHr8JUAmCRuoGVxrB2uYcr21U3_Y4RsOuZQFhTJ2eBBU0ka2rfun78qp_ebNg/s200/P1090806.JPG" width="200" /></a></div>
Des said that the language they wrote their functions in was C# but that after this experiment and some other tests he found that languages that require a runtime environment or other framework (such as C# or Java) <a href="https://mikhail.io/serverless/coldstarts/aws/languages/">have a slower cold start time</a> than the other languages such as Javascript, Go, Python. The <a href="https://mikhail.io/serverless/coldstarts/aws/instances/">startup time did reduce for C# if you increased the instance size</a> (increase memory) but this also increases your costs.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgalnrNDQ11gT3yPsABMFJ8lcLvxTW40a6z3pLs7YIZfads41yLsXhrubT8EtSmDjCp-Xtzs6qrEpln65o_ByhqRYo3R-Yj7o8BqNoSsizNQ2WoA50Y5qvoiIveIqhYMqnNhxcbQA/s1600/P1090813.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgalnrNDQ11gT3yPsABMFJ8lcLvxTW40a6z3pLs7YIZfads41yLsXhrubT8EtSmDjCp-Xtzs6qrEpln65o_ByhqRYo3R-Yj7o8BqNoSsizNQ2WoA50Y5qvoiIveIqhYMqnNhxcbQA/s200/P1090813.JPG" width="200" /></a></div>
Apart from choosing the 'correct' programming language other optimisations available are keeping lambdas warm by regularly pinging them to keep them alive, keeping the functions small so that they are fast to load and start as well as using <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">Lambda Layers</a>. Des and his team used <a href="https://aws.amazon.com/xray/">AWS X-Ray</a> to trace and debug their investigating, using it to analyse the full stack to view the timings and bottlenecks,<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUabvQkkKMksPwNRs661NrmZFEPTrhge35ex3v62S5Z6_A6VJ73ZF3ut25YTshz-Arab5UdUIwXvdbDbYs1ZbjoM-dz3yc9dX3Cpc0avrzsniycaol5slknY7XzaZDiGh5kFplA/s1600/P1090815.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDUabvQkkKMksPwNRs661NrmZFEPTrhge35ex3v62S5Z6_A6VJ73ZF3ut25YTshz-Arab5UdUIwXvdbDbYs1ZbjoM-dz3yc9dX3Cpc0avrzsniycaol5slknY7XzaZDiGh5kFplA/s200/P1090815.JPG" width="200" /></a></div>
He then covered the Freeze/Thaw Process where once a lambda function is executed AWS keeps the container warm for a while to reduce the number of cold starts. Not only does it keep the container warm but it 'freezes' the service so any declarations in the code are still there (so no further initialisation required) as well as any stored data is still available so this optimises the function for further reuse.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNxPwGq9Z1Cwxtd4AQt_QPgdwmsDFWxiEMsbzhqwgRYXw0nYVvqtTJI3KC9ILRTHWh4kY2yJEg2DlMjsGxE1OA9edrI_DQYZRgk9Qbyz8_oxOnYDBIDlL86FPM3si0CN2Dpm6KIw/s1600/P1090816.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNxPwGq9Z1Cwxtd4AQt_QPgdwmsDFWxiEMsbzhqwgRYXw0nYVvqtTJI3KC9ILRTHWh4kY2yJEg2DlMjsGxE1OA9edrI_DQYZRgk9Qbyz8_oxOnYDBIDlL86FPM3si0CN2Dpm6KIw/s200/P1090816.JPG" width="200" /></a></div>
Pricing was addressed next based on their estimates of needing 25 million Lambda invocations a month. Total costs were around £1k but interestingly more than half of that cost was on the <a href="https://aws.amazon.com/cloudwatch/">CloudWatch </a>metrics & logs and the <a href="https://aws.amazon.com/xray/">X-Ray</a> tracing features. We discussed whether it would be prudent to turn off these features once the system was 'bedded in' but then you are removing any ability to investigate failures that had happened due to having in effect 'no logs'.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmhSZmNzBSTUZweKddVH9K-Wa6_TWdtQydgBXCqt33MNcwG0Iu1-4QAFoi_wEEdf4TnqMbztHT7R1NNZTRvQbn9cwL4-sp46yg7IyvelNkGWqpePFr1TwuDngjsizvyuSxbmkNg/s1600/P1090818.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmhSZmNzBSTUZweKddVH9K-Wa6_TWdtQydgBXCqt33MNcwG0Iu1-4QAFoi_wEEdf4TnqMbztHT7R1NNZTRvQbn9cwL4-sp46yg7IyvelNkGWqpePFr1TwuDngjsizvyuSxbmkNg/s200/P1090818.JPG" width="200" /></a></div>
If you have a <a href="https://aws.amazon.com/vpc/">VPC (Virtual Private Cloud)</a> setup then by default AWS Lambdas can't connect to resources within it, however you can create an elastic network interface for your Lambda in your VPC and now it can access your resources. In previous versions of Lambdas it used to be really slow but this has been improved upon now (see the very last section of this article <a href="https://mikhail.io/serverless/coldstarts/aws/">Cold Starts in AWS Lambda</a>).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC7B7_sQfRRZbREcZET09qU2Mt3sJjum57Q1ruUKHC75An3jjyVP0VV0SfOaC6lanJiWJHPUITkTK1KYq-w_g6oInYM734xCaU8TO3NeHtWWPao79pu8cVdm5dDe1MLiIqhMZP6g/s1600/P1090819.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC7B7_sQfRRZbREcZET09qU2Mt3sJjum57Q1ruUKHC75An3jjyVP0VV0SfOaC6lanJiWJHPUITkTK1KYq-w_g6oInYM734xCaU8TO3NeHtWWPao79pu8cVdm5dDe1MLiIqhMZP6g/s200/P1090819.JPG" width="200" /></a></div>
Des finished with an explanation about the limits on the number of lambdas that Amazon will spin up on demand for you and it was quite surprising really. The initial level of concurrency varies between regions from 500 to 3000, and then after that initial burst is can scale by an additional 500 instances per minute. However each region also has a default lambda concurrency limit which is 1000 by default so if you are expecting a massive initial hit you'd better start talking to Amazon to get your quota increased!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj_m3iAiNqyYACyDfXVWQNCY5WsFfzU7VB5Mg3SLGtFB4puqE3JCm25LLf0jZLdonynmJtiTb1g9mnShyphenhyphenCqKYAMyEWeRdTzAvhFQtKXqwuCiJmCslvTAnJ8njKut410imOZiHpBQ/s1600/P1090801.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj_m3iAiNqyYACyDfXVWQNCY5WsFfzU7VB5Mg3SLGtFB4puqE3JCm25LLf0jZLdonynmJtiTb1g9mnShyphenhyphenCqKYAMyEWeRdTzAvhFQtKXqwuCiJmCslvTAnJ8njKut410imOZiHpBQ/s200/P1090801.JPG" width="200" /></a></div>
There were then multiple conversations that 'spun up' from this presentation which was excellent, and I'd like to personally thank Des Webster for an excellent and insightful presentation. <span style="background-color: white; color: #292929; font-family: inherit;">It was an excellent evening and it was great to have a larger audience this time and the discussions and networking that happened at the event was great.</span><br />
<span style="font-family: inherit;"><br style="background-color: white; color: #292929;" /><span style="background-color: white; color: #292929;">Thank you to </span><a href="https://www.meetup.com/AWS-User-Group-Liverpool/members/?op=leaders" style="background: rgb(255, 255, 255); color: #72179d; cursor: pointer; text-decoration-line: none;">Paul, Paul and Simon</a><span style="background-color: white; color: #292929;"> for organising and Amazon for sponsoring.</span></span><br />
<br /></div>
<div>
<br /></div>
Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-28787585180839265302019-11-14T16:00:00.002+00:002019-11-15T08:57:17.274+00:00North West Tech Talks - Creating a FinTech Bank & Managing change at scale<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnuRi7oy1rAMlUAK7J3_Vjpr4Zytiw4i6I7pmPeXk1YsH0zOStXbp3y4_V8DQkoaqXrIVgRLMScVvl9VGmElP4uSoCqFLZQc_l2HgzqF11P9Lrd6VSRpPR7CPMnV8dd7pYvnZA5g/s1600/P1090786.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnuRi7oy1rAMlUAK7J3_Vjpr4Zytiw4i6I7pmPeXk1YsH0zOStXbp3y4_V8DQkoaqXrIVgRLMScVvl9VGmElP4uSoCqFLZQc_l2HgzqF11P9Lrd6VSRpPR7CPMnV8dd7pYvnZA5g/s200/P1090786.JPG" width="133" /></a></div>
It was a busy week for me last week with both Wednesday and Thursday evening spent at meetups. Wednesday's was the <a href="https://www.meetup.com/North-West-Tech-Talks/">North West Tech Talks</a> meetup hosted by <a href="https://www.ao-jobs.com/">AO</a> in their very cool building over in Bolton. It's a bit of a trek from Ormskirk and due to traffic took me over an hour to get there but it was well worth it, the content and speakers were great as was the food!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvjXuAu2Wjthch8qPIExR-NwB9Tekn2LDQicnu0OV8R-mPTut_nD28e3p3Mk1ON5ADcLxDizwteyTqc-DPXHmHgf7yDNxlW8oMrKjSM_3ZzULYsBGcJ9vn9S7qyPVL2fVkOHU-xw/s1600/EItda8bXYAgTIh8.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvjXuAu2Wjthch8qPIExR-NwB9Tekn2LDQicnu0OV8R-mPTut_nD28e3p3Mk1ON5ADcLxDizwteyTqc-DPXHmHgf7yDNxlW8oMrKjSM_3ZzULYsBGcJ9vn9S7qyPVL2fVkOHU-xw/s320/EItda8bXYAgTIh8.jpg" width="320" /></a></div>
I had two reasons for making the trip to this one, first was the good content listed for the evening but secondly my other remote colleagues were going so we could spend a little face-to-face time together rather than just speaking on the phone. After about thirty minutes to get a drink (beer, wine, soft drinks) and mingle a little it was time for the first speaker.<br />
<br />
<b>How the heck do you manage half a million devices?</b> - <a href="https://twitter.com/PeterEgerton">Peter Egerton</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCqVOUC512kEyN2UIrNfslMhzikhhm2GKHj2Fo6gcQwdmuKtbMPg6zrO8-O8HrRWs0BHCzILqqOnViGs3ZcG_uaz5-iEteAqRi6wYw_pdQMoNx9oXvLHc32HVLqRDpjSJbfADy_w/s1600/P1090749.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCqVOUC512kEyN2UIrNfslMhzikhhm2GKHj2Fo6gcQwdmuKtbMPg6zrO8-O8HrRWs0BHCzILqqOnViGs3ZcG_uaz5-iEteAqRi6wYw_pdQMoNx9oXvLHc32HVLqRDpjSJbfADy_w/s200/P1090749.JPG" width="133" /></a></div>
First up was Peter with his suggestions on how to be able to correctly manage content distribution to a huge number of devices in multiple regions whilst not failing and ending up in the news. You need to be using the "right tools" - use the best applications, get the right skills, get the right people and get yourself a lab so that you can try the deployments out in a non-production environment.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAyPU76otu_czXjB761k6AhS8mq8LKBj2yyNmzFtXm3hNiRYTcgoFrLOZFJq6GMqBmMsr4iqRhBev4DbK_c4X5t93WSwwzEYZJuWYIxBr6ZksKxXBtQ2Eo4cr9Y6LzmOzqs7_nkQ/s1600/IMG_20191106_183329601.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAyPU76otu_czXjB761k6AhS8mq8LKBj2yyNmzFtXm3hNiRYTcgoFrLOZFJq6GMqBmMsr4iqRhBev4DbK_c4X5t93WSwwzEYZJuWYIxBr6ZksKxXBtQ2Eo4cr9Y6LzmOzqs7_nkQ/s320/IMG_20191106_183329601.jpg" width="320" /></a></div>
"bulk up, but stay lean" - You need good hardware whether that is on-prem or using cloud facilities. If you are in the cloud then you need to be thinking about regions and availability zones, not only for coverage and latency but also for disaster recovery. You need to be kind to your database and cache commonly accessed stuff so that it's not being hammered by thousands of devices at the same time. Spend money on boosting performance rather than trying to tidy up after an issue, it's cheaper to spend money on up-front performance compared to the human administration costs of investigating and fixing a performance issue.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqzaGPzGD5Mbh4jGYXGqv8dAroF7qrSf5FZ1poUIagq05s4F799kFr93ZxGo9auznSz5wydosI3v_d-LrZLtrGAsJFaKJRpLd31Ygme1d9e0cHmhGMB3UiDoPWqa-mUL_7hzETg/s1600/EItahcoXsAABHAg.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqzaGPzGD5Mbh4jGYXGqv8dAroF7qrSf5FZ1poUIagq05s4F799kFr93ZxGo9auznSz5wydosI3v_d-LrZLtrGAsJFaKJRpLd31Ygme1d9e0cHmhGMB3UiDoPWqa-mUL_7hzETg/s320/EItahcoXsAABHAg.jpg" width="320" /></a></div>
"get clever" - sometimes an unsupported solution may be required. You should be considering how to pre-stage content to get it close to your audience before rollout, and trickle it out rather than go for the "big bang" approach. Send out only what you need, and Microsoft now support peer-to-peer distribution. You also need to phase your deployments so that if it fails for some reason you can roll it back without it affecting the entire suite of devices.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4VXDJDvkd9qepS62dzcz0SitpSeS_KBBkoAR5oniKX1Mi3-u0dwMi4absOC4Tp3h-5wNPnw2m9OFqGwHyxn-DyuhBUqFl4EKXuNpkoHVeXplsdEOGB5Vavq0_unPXcjhu8ySMw/s1600/P1090734.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4VXDJDvkd9qepS62dzcz0SitpSeS_KBBkoAR5oniKX1Mi3-u0dwMi4absOC4Tp3h-5wNPnw2m9OFqGwHyxn-DyuhBUqFl4EKXuNpkoHVeXplsdEOGB5Vavq0_unPXcjhu8ySMw/s200/P1090734.JPG" width="133" /></a></div>
"stay safe, not in the news" - own the solution and have a core team who understand the product. Use role-based access to control what security is required and who should have access. Use approvals on deployments to ensure the business understands and agrees the impact of this rollout. "Nail the CAB" - (<a href="https://www.bmc.com/blogs/itil-change-advisory-board-cab/">Change Advisory Board</a>). Standardise the process and ensure you keep everything up to date (OS, DB, apps, etc.) if you are out of date, your support contracts will be useless.<br />
<br />
<b>Design thinking - The Beatles Edition</b> - <a href="https://twitter.com/dsigndby">Craig Connell</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXsJKts4oKxaCWTV31XCEAccTu5_nTIr_5MDYomIowQcaYuZxyvY315342aDuPRHFVlyOJYR1hBrwDgfLFGE-E86OLYA4HFu0E4NV8YJB6R3poIhjcH8FyualQ1SshLzKpXEeKaA/s1600/P1090753.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXsJKts4oKxaCWTV31XCEAccTu5_nTIr_5MDYomIowQcaYuZxyvY315342aDuPRHFVlyOJYR1hBrwDgfLFGE-E86OLYA4HFu0E4NV8YJB6R3poIhjcH8FyualQ1SshLzKpXEeKaA/s320/P1090753.JPG" width="320" /></a></div>
Next up was a lightning talk from Craig, AO's product designer about the "double diamond" design process. I'll not try to explain it myself as the talk was delivered at a pretty rapid pace and I was busy taking photos of the slides but really should have been paying more attention to what he was saying! (note to self: take less photos, listen more intensely). However the double diamond design framework is explained very nicely on the <a href="https://www.designcouncil.org.uk/news-opinion/what-framework-innovation-design-councils-evolved-double-diamond">British Design Council's website</a>. One thing that I didn't miss was Craig's fun but relevant use of various Beatles songs to describe the different stages of the design process.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjraz7Ngqt2xO96cTxAdav3ciEiaZvfLen_0MiNKZctMzNjm87AisM0ciRQgEw0_zCwguGxv2RaIoUAFHkRGw9sZC4jOdQPF42cRt9r-9rZZiwN5IzUuZ2zilOKaUpKtipuV4gm3Q/s1600/P1090761.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjraz7Ngqt2xO96cTxAdav3ciEiaZvfLen_0MiNKZctMzNjm87AisM0ciRQgEw0_zCwguGxv2RaIoUAFHkRGw9sZC4jOdQPF42cRt9r-9rZZiwN5IzUuZ2zilOKaUpKtipuV4gm3Q/s200/P1090761.JPG" width="200" /></a><br />
Then it was time for food, drink and some networking. The food was a delicious curry with naan breads and pakoras, all really tasty!<br />
<br />
<b>How to create, build and sell a successful FinTech startup</b> - <a href="https://twitter.com/AsimFintech">Muhammad Asim</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiMOqH__-nO4rTEfSFiGx4dBBikcxv3rQqtCpHNqyQkt-uhWgpA5MYu8dmKqTKy0Y-uh19wW91E8HJ28eU4JKyrLwRNwzqfj-x-ZKzaYTNB-MuAdYCfPLigKNSjzodxc0UhDGy6A/s1600/P1090768.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiMOqH__-nO4rTEfSFiGx4dBBikcxv3rQqtCpHNqyQkt-uhWgpA5MYu8dmKqTKy0Y-uh19wW91E8HJ28eU4JKyrLwRNwzqfj-x-ZKzaYTNB-MuAdYCfPLigKNSjzodxc0UhDGy6A/s320/P1090768.JPG" width="320" /></a></div>
The final talk from was Asim the CEO and Founder of <a href="https://www.marqmillions.com/">Marq Millions</a>. He started in business aged just 17 with the family money exchange company, by 21 was running his own events company. By 24 moved to the UK to fulfil his father's dream of a founding a UK bank, by 28 launched a FinTech company and by 30 sold it! He was an inspirational presenter and I loved hearing his story about the good and the bad bits, I've tried to capture some of them below but I don't feel it really does the talk justice at all!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfzb1Qk6oaRfwxtszjMlXcZXYOyJzj4lX3pgGWFmoIKAmP97MlPWQaduY_KNsm51BAY3BJDDeBX1a9OYyLF-qLBIEbHrdkX3_b-x7tOn5RClz8JWfmeHV7JNPkciA9eAWILWDRQ/s1600/P1090770.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfzb1Qk6oaRfwxtszjMlXcZXYOyJzj4lX3pgGWFmoIKAmP97MlPWQaduY_KNsm51BAY3BJDDeBX1a9OYyLF-qLBIEbHrdkX3_b-x7tOn5RClz8JWfmeHV7JNPkciA9eAWILWDRQ/s320/P1090770.JPG" width="212" /></a></div>
His aim for his FinTech company was to be able to open a full bank account (<a href="https://www.arromoney.com/">Arro</a>) in under three minutes whilst adhering to all the stringent UK banking rules and regulations. He regretted not having multiple investors from the start, instead he took money from his mum whereas external investors would have provided advice and guidance as well as money. Due to his background in finance he thought he could be the CFO as well as the CEO, this spread him too thin and he regrets that decision now. He also said that it's very important to choose the right partners rather than the first one that shows interest, they wasted six months whilst this partner delayed things and had to break the partnership in the end.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_IMKMi3k4VCFTVQ0PFPVWRv2snqrrOVRR-w5STF_xVlDISoVsFJ-T_SJDKIkWDqRI_k6WGfgfEPmVZiPbKuUXHMC4k3xPGtx2H3IuxAQsrn29-AMeWehMuehFdrMP3dw3v93YVw/s1600/P1090777.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_IMKMi3k4VCFTVQ0PFPVWRv2snqrrOVRR-w5STF_xVlDISoVsFJ-T_SJDKIkWDqRI_k6WGfgfEPmVZiPbKuUXHMC4k3xPGtx2H3IuxAQsrn29-AMeWehMuehFdrMP3dw3v93YVw/s320/P1090777.JPG" width="213" /></a></div>
He also talked about the importance of creating a brand for yourself so that people recognise who you are and what you are about. PR is fundamental in getting the message out about your product, even if your product is amazing, if no one knows about it you won't be selling anything.<br />
<br />
I truly inspirational guy and really down to earth, I hope I get to see more presentations from Asim in the future.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgCgpOdWTYNNblQHWZ4whZO07fp6Do-5cIWu_1pRm-bvNOE1SbLccsLAmNSr2c4FiC3nLe2dHOTHdYc2hH8rQDabg606WYKVr08ExCWSBWE83g0YU7bmyEVB4fIPGt7lsmPsycg/s1600/P1090782.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgCgpOdWTYNNblQHWZ4whZO07fp6Do-5cIWu_1pRm-bvNOE1SbLccsLAmNSr2c4FiC3nLe2dHOTHdYc2hH8rQDabg606WYKVr08ExCWSBWE83g0YU7bmyEVB4fIPGt7lsmPsycg/s320/P1090782.JPG" width="213" /></a></div>
Thank you so much to <a href="https://www.linkedin.com/in/bethanystevens/">Bethany Procter, Project Manager at AO</a> who MC'ed the evening and thanks to <a href="https://ao.com/">AO</a> for hosting the event and providing the drinks and the lovely food (ordered from Simply Delicious). Really looking forward to more <a href="https://www.meetup.com/North-West-Tech-Talks/">North West Tech Talks</a> in the new year!<br />
<div>
<br />
If you enjoyed this blog post why not follow me on <a href="https://twitter.com/abeacock">Twitter (@abeacock)</a> or via <a href="https://www.linkedin.com/in/andrewbeacock/">LinkedIn (Andrew Beacock)</a></div>
Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-32116177275220568702019-10-05T14:26:00.001+01:002019-10-05T14:27:12.557+01:00Lancashire Tech Talks #8 - Digital Transformation with DevOps, Docker and the Public Cloud<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJNBdK3s8GmpwFSZz-gUeP6fqNQAyoU_OtdZjWOVSVv4MS6gkfxx7xpIt0IEE6Nh_ga1uVthtexTicTGtbURWdQPaPeV8Joh-1q0tg1DtzIPZxmPbkfLgtw_gFwV7rh3WwypAlSw/s1600/P1090712.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJNBdK3s8GmpwFSZz-gUeP6fqNQAyoU_OtdZjWOVSVv4MS6gkfxx7xpIt0IEE6Nh_ga1uVthtexTicTGtbURWdQPaPeV8Joh-1q0tg1DtzIPZxmPbkfLgtw_gFwV7rh3WwypAlSw/s320/P1090712.JPG" width="320" /></a></div>
The 26th September saw the return of <a href="https://www.meetup.com/Lancashire-Tech-Talks/">Lancashire Tech Talks</a> a meetup group run by <a href="https://www.linkedin.com/in/andrewjamesnorton/">Andy Norton</a> and <a href="https://www.linkedin.com/in/hoiyen-sihapanya-58483224/">HoiYen Sihapanya</a> in Blackburn. The topics were Docker and migrating to the cloud. HoiYen has been involved with running all eight of the meetups and as I've recently taken over the <a href="https://www.meetup.com/Liverpool-Software-Architecture/">Liverpool Software Architecture meetup</a> I was keen to pick her brains about how to run a successful meetup evening.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkBoLpfILdrv3bdaES6KX5EIDwmnORJ2dAJnlF26ZADmuP1ttFqTjlMQE525NySzunnt3heFSeLz3yvNLhhjWqASSyrRPuCwfXKdxppAXccaAsUQTqQRZ4_J8KB3IwHZMjB4KZpg/s1600/P1090726.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkBoLpfILdrv3bdaES6KX5EIDwmnORJ2dAJnlF26ZADmuP1ttFqTjlMQE525NySzunnt3heFSeLz3yvNLhhjWqASSyrRPuCwfXKdxppAXccaAsUQTqQRZ4_J8KB3IwHZMjB4KZpg/s320/P1090726.JPG" width="320" /></a></div>
Some beers and soft drinks were on ice when we arrived and lots of people were stood around in small groups catching up with old work colleagues or just networking to make new friends. After a brief introduction and run through of the format of the evening it was time for the first talk.<br />
<br />
<br />
<b><br /></b>
<b>Docker: Lies to Children - <a href="https://www.linkedin.com/in/jamie-taylor-57602959/">Jamie Taylor</a></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHT8CpeaO0TaZTvwb2-AWCAbJTMU_2l_-8xOaFYufl5Fdm5k-GiqYteYarZJoVGJOyvvReKrX0X5KIPYUfHVq5XfCSY5F5e7eNSqj5VVpDHPSMq9qiyrkFBDvX38wRjeP1jjCow/s1600/P1090720.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHT8CpeaO0TaZTvwb2-AWCAbJTMU_2l_-8xOaFYufl5Fdm5k-GiqYteYarZJoVGJOyvvReKrX0X5KIPYUfHVq5XfCSY5F5e7eNSqj5VVpDHPSMq9qiyrkFBDvX38wRjeP1jjCow/s320/P1090720.JPG" width="320" /></a></div>
Jamie's talk was on DevOps and Docker. He ran through where DevOps has come from, explaining about the <a href="https://www.toyota-europe.com/world-of-toyota/this-is-toyota/toyota-production-system">Toyota Production System</a>, <a href="https://searcherp.techtarget.com/definition/kaizen-or-continuous-improvement">Kaizen</a> and <a href="https://itrevolution.com/the-three-ways-principles-underpinning-devops/">The Three Ways</a> as techniques to help speed up learning and improving processes. Next he moved onto explaining what Docker was, that it uses containerisation and will run on Windows as well as Linux. He explained about how Docker containers can be networked together, that you write dockerfiles to configure them and how they can be secured as well. You are probably best off reading through his excellent slides slides which have loads of notes as well, <a href="http://files.andrewbeacock.com/Docker%20-%20Lies%20to%20Children.pdf">available here</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2BoZZSDPtnghnccwUtLjuXCjIGZ87yb4VAmYKQD89Wa2x0cNWxgMnmPFGByWN3eX8sc4Fw2aGom0BpxoPh2Hj4dixFOZvYQRdPihx773tb4FnTVqgPhGzihC3NCTlLsqRpQCSwA/s1600/P1090722.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2BoZZSDPtnghnccwUtLjuXCjIGZ87yb4VAmYKQD89Wa2x0cNWxgMnmPFGByWN3eX8sc4Fw2aGom0BpxoPh2Hj4dixFOZvYQRdPihx773tb4FnTVqgPhGzihC3NCTlLsqRpQCSwA/s200/P1090722.JPG" width="133" /></a></div>
Next was a break for food, a large selection of massive 14" pizzas, the pepperoni and tandoori chicken one was excellent, tasty with a real nice spicy kick to it. I got a chance to chat to <a href="https://www.linkedin.com/in/carlwhalley/">Carl Whalley</a> who was interested in replacing his aging Windows VMs used for camera control software with Docker containers. I also got to catch up with a couple of my remote colleagues, <a href="https://www.linkedin.com/in/mark-wickens-5204a56/">Mark Wickens</a> and <a href="https://www.linkedin.com/in/calum-shaw-mackay-045199a/">Calum Shaw-Mackay</a>. We speak to each other every day but rarely get a chance to meet face-to-face.<br />
<br />
<br />
<b>The Dawning of a New Era - <a href="https://www.linkedin.com/in/dave-whyte-33b5334/">Dave Whyte</a></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKYGjuXTNiKbGuIYhTVXPAzb_60uWt2PbyHqwoyHttHSCJ6jDfFX70Hn1vkM0viyj-BvO9j7pipo7x0gqHQv3Ra4azisELpWuQka8YbOvRW0HrFdVjeCxDF1FYgeZUk65ru4LjAg/s1600/P1090729.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKYGjuXTNiKbGuIYhTVXPAzb_60uWt2PbyHqwoyHttHSCJ6jDfFX70Hn1vkM0viyj-BvO9j7pipo7x0gqHQv3Ra4azisELpWuQka8YbOvRW0HrFdVjeCxDF1FYgeZUk65ru4LjAg/s320/P1090729.JPG" width="213" /></a></div>
The next talk was from Dave Whyte who is the Operations Lead at AutoTrader. Dave's talk was amazing, he detailed the transformation from traditional long development time projects with infrequent and problematic deployments through to doing hundreds of deployments a day. He talked about what kind of people and culture are required as well as detailing some of the tools they built and use in order to achieve such agile delivery. I've found Dave's talk on the same subject from a different conference so why not what it for yourself? (Dave's slides are <a href="https://www.slideshare.net/secret/lHnuxqgKzGWu2A">available here</a>)<br />
<br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/tmp5HSvMY8Y" width="560"></iframe>
<br />
<br />
Yet another excellent evening by Lancashire Tech Talks and t<span style="background-color: white; color: #292929; font-family: "lora" , serif; font-size: 18px;">hanks to Andy & HoiYen for organising, and <a href="https://www.grahambrown.com/uk/">Graham & Brown</a> for hosting.</span>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-32421375840150312352019-09-29T20:51:00.001+01:002019-09-29T21:02:36.739+01:00ExpertTalks Manchester - Secrets of an Agile Transformation & Obstacles of Digital Transformation Evolution<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSWLWmzcaSyYV07Xhprnl3a_K1iQlRw1gybfBZnyV52HPQkRKf07en7xiPZn6WFiE7icqIcKuyC4sinXp3n0VgNvz_6LEWcwh0cKzHotz0mvahqcfBKciMSJXmO4fD0gD0aUaS7Q/s1600/P1090689.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSWLWmzcaSyYV07Xhprnl3a_K1iQlRw1gybfBZnyV52HPQkRKf07en7xiPZn6WFiE7icqIcKuyC4sinXp3n0VgNvz_6LEWcwh0cKzHotz0mvahqcfBKciMSJXmO4fD0gD0aUaS7Q/s400/P1090689.JPG" width="400" /></a></div>
It was a busy week for me this week with two meetups that I was planning on attending. The first was on Tuesday over in Manchester hosted by <a href="https://www.equalexperts.com/">Equal Experts</a> on agile transformations. The weather was horrendous although it brighten up by 4pm. Drove off to Burscough Bridge station on the Manchester line, bought my ticket only to be informed that the train to Manchester was cancelled. Suggested that I could get a different train on a different line if I drove to Bursough Junction station so off I went. Found out when I got there that this particular train was also cancelled and that I'd have to drive to Wigan to ensure that I could get a train into Manchester. I had planned on being there around 5:30 however I didn't get to the meetup until just after 6:30. This meant that I'd missed the drinks/food/networking that occurs before the talks and walked in with the first talk already in progress!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<b>Obstacles of Digital Transformation Evolution - <a href="https://www.linkedin.com/in/ryan-bryers-3b478a48/">Ryan Bryers</a></b><br />
Ryan's talk was on the challenges that you will face when you try to bring a large transformation to bear within an existing organisation. He discussed resistance to change, and how the people and the culture is key to enabling a positive transformation. It was quite a high-level talk and so I didn't take many notes, luckily the presentation was being videoed so you can watch Ryan video below (his <a href="https://www.slideshare.net/EqualExperts/obstacles-of-digital-transformation-evolution/EqualExperts/obstacles-of-digital-transformation-evolution">slides are also available</a>).
<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/362307982" width="560"></iframe><br />
Following a short break where I did managed to get a spot of delicious vegetarian Indian-style food but ended up with no time for any networking which is a big shame as I had planned on meeting <a href="https://codurance.com/about-us/our-people/#team-emma_booth">Emma from Codurance</a> but didn't get the chance.<br />
<br />
<b>Secrets of an Agile Transformation - <a href="https://www.linkedin.com/in/david-cox-55297a58/">David Cox</a></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDD5UFCyv5DGLDbeebaKRWuXRZFWYKOqKINWTCwOgMmUY7glq4t6TZTn6gN_VFajZsnLBsZlS4eDemoBXtEqV7FkeAZ9E4qkNtQ0g3rpa5pyabSJQ5vGpZwlJR3NsFTCov9-p8Wg/s1600/P1090703.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDD5UFCyv5DGLDbeebaKRWuXRZFWYKOqKINWTCwOgMmUY7glq4t6TZTn6gN_VFajZsnLBsZlS4eDemoBXtEqV7FkeAZ9E4qkNtQ0g3rpa5pyabSJQ5vGpZwlJR3NsFTCov9-p8Wg/s320/P1090703.JPG" width="320" /></a></div>
David's talk was on how he was tasked with taking his company through a major transformation and how he dealt with it. There was talk about don't aim to fail fast but if you do that's ok, agree a common understanding of agile (due to there being so many strands of it). Lots of talk about listening to people and trying to understand where they are coming from, and keep digging to get to the root causes of pain and suffering.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidITdifx6x-utvIPMxnRMaNyLAFpA8F6fOHuwLdE0XvZDkYvAx7K4TINKzyCp7rkwuLe-NBrdsizvJvJcXQ7AuGZONyi89413WxDH4U8l4tY2UJG2lGBl6jGPlL6tm0FNZJDGxfg/s1600/P1090706.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidITdifx6x-utvIPMxnRMaNyLAFpA8F6fOHuwLdE0XvZDkYvAx7K4TINKzyCp7rkwuLe-NBrdsizvJvJcXQ7AuGZONyi89413WxDH4U8l4tY2UJG2lGBl6jGPlL6tm0FNZJDGxfg/s320/P1090706.JPG" width="320" /></a></div>
I wish there was a video of the talk available because my brief notes above do not to the talk justice, it was an excellent talk and David's empathy and determination really came across. Out of nine different workstreams assigned to make change, David's was the only one to succeed, he was then put in charge of all nine workstreams, quite an achievement! David's <a href="https://www.slideshare.net/EqualExperts/secrets-of-an-agile-transformation">slides are available here</a>.<br />
<br />
<br />
The evening was over pretty quickly once David finished his talk which was a bit of a shame as I would have liked to spend a bit of time talking to the presenters and meeting some of the other attendees. Also the room was rather dark so although the presentations were very clear, it was difficult to see the speakers clearly (and it meant my photos were rubbish). Over 200 people had said they were attending the event whereas I did a quick headcount and maybe counted 60, this is really bad as it means that Equal Experts potentially had to cater for far more people than actually attended. I think as meetup members we need to be fair to the hosts and sponsors and make sure that if we can't make it that we 'say so'.Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-15963847874757914392019-09-15T15:46:00.000+01:002019-09-15T15:47:59.944+01:00AWS User Group Liverpool #6 - AWS AppMesh<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_HMgc01lC2xGU2Ax0p_IeY5rfUROHToUgA8yrcQwfxbWRGjP8MqLm52nmBUn58VDYNLCxmEGcKZv3df3iKObff89vp-l1ESOdw5Qt86FBuULXNks1G15fZdesEioc77bF4IAMA/s1600/P1090646.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_HMgc01lC2xGU2Ax0p_IeY5rfUROHToUgA8yrcQwfxbWRGjP8MqLm52nmBUn58VDYNLCxmEGcKZv3df3iKObff89vp-l1ESOdw5Qt86FBuULXNks1G15fZdesEioc77bF4IAMA/s320/P1090646.JPG" width="320" /></a></div>
I've been interested in <a href="https://aws.amazon.com/">AWS </a>since<a href="https://en.wikipedia.org/wiki/Amazon_Web_Services#History"> it was released</a> and read up on EC2, S3 and SQS but never really had much need to really get into them. I have been using S3 storage for around ten years as a bucket in which to store my podcast recordings but that was it.<br />
<br />
Out of the three major cloud providers (Amazon, Google & Microsoft) I've always felt an affinity with AWS, probably born out of the fact that it was the first one that I read into. On browsing <a href="https://www.meetup.com/">Meetup </a>recently I came across the <a href="https://www.meetup.com/AWS-User-Group-Liverpool/events/262210593/">AWS User Group Liverpool</a> and so attended the meetup on Thursday.<br />
<br />
Although thirteen people had signed up for it there was a total of five of us there, two of which were the meetup organisers! I still don't understand why more people don't attend these free events, there was pizza and beer, like-minded folk and good content as well as having a chance to chat with some of the <a href="https://twitter.com/DoESLiverpool">DoES people</a> and see what they are building.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQVooVIMapgXq4J6N64BSA-YCNeaj5H4enAH4hNlEZHhqgymKdm5iwDUyzdGXJoLoPwc5Xqiz2mmeD4YCoKx3IpwYFXr4MCC1FY-MpvbMEcKMeNBS0xhty2R3kpU3PVHZumZw60A/s1600/P1090657.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQVooVIMapgXq4J6N64BSA-YCNeaj5H4enAH4hNlEZHhqgymKdm5iwDUyzdGXJoLoPwc5Xqiz2mmeD4YCoKx3IpwYFXr4MCC1FY-MpvbMEcKMeNBS0xhty2R3kpU3PVHZumZw60A/s320/P1090657.JPG" width="320" /></a></div>
This evening's presentation was by <a href="https://www.meetup.com/AWS-User-Group-Liverpool/members/260724365/profile/">Paul Gledhill</a>. He gave a brief round-up of what's new in the world of AWS including <a href="https://aws.amazon.com/qldb/">Quantum Ledger Database</a> (QLDB), <a href="https://aws.amazon.com/forecast/">Forecast</a> & <a href="https://aws.amazon.com/deeplens/">DeepLens</a>. Then it was onto the main topic "AWS AppMesh (and what is a service mesh anyway?)".<br />
<br />
He started by explaining the evolution of the execution environment, from dedicated servers to virtual machines, into cloud-based VMs, and then containers. When you start to build a large networked system (using microservices or the like) you have a number of cross-cutting concerns that every node in the network needs to deal with such as service discovery, routing, logging, security, etc.<br />
<br />
You can either develop these features yourself, or use one of many open-source components out there to help you do it. One set of common services was <a href="https://netflix.github.io/">developed by Netflix and spun out as open source</a> which is now part of the <a href="https://spring.io/projects/spring-cloud">Spring Cloud framework</a>. Some problems with this approach though is that it's heavily java focused, you can interact with it from other languages via various adapters or APIs but they are slow and bulky, also as they are library-based they are compiled into your business logic and so become part of your application deployment.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYFdQBvotuZA_SXXRTw8O4v-OchZUCpItCUOZySspU3EadYcjgqF0_GSKyYWg79dOGWWRtuoiAyFUuH_UnGx-_xnx6wrPEqKO5TP6zY1J9zU1LM6bQ7WszsD8LCEy6zRAiEfWRVg/s1600/appmesh-sidecar.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="321" data-original-width="521" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYFdQBvotuZA_SXXRTw8O4v-OchZUCpItCUOZySspU3EadYcjgqF0_GSKyYWg79dOGWWRtuoiAyFUuH_UnGx-_xnx6wrPEqKO5TP6zY1J9zU1LM6bQ7WszsD8LCEy6zRAiEfWRVg/s400/appmesh-sidecar.JPG" width="400" /></a></div>
A newer, cleaner approach is to use a service mesh to provide these features along side your deployed business logic rather than being tightly coupled within it, examples include <a href="https://istio.io/">Istio</a>, <a href="https://linkerd.io/">Linkerd</a> & <a href="https://www.consul.io/docs/connect/">Consul Connect</a>, another example launched in March 2019 is <a href="https://aws.amazon.com/app-mesh/">AWS App Mesh</a>. App Mesh sits outside of your app container, proxying external traffic to/from your application whilst providing the cross-cutting concerns. <a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar">This design pattern is called a sidecar proxy</a> as it bolts onto the side of your application container.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GFvKaZ5mnl_JaJ1dOl_1-0MBqjxSodAJ0i7-uFFOxh-03lGwa0b2ZwSEEElLin1AGA_iun4p0VGlUKpRyytteaJCTaoEQTzBK5NWhXP_-UBBPsyOVzTy26gpNfRKXngI-f8urQ/s1600/appmesh.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="491" data-original-width="899" height="347" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GFvKaZ5mnl_JaJ1dOl_1-0MBqjxSodAJ0i7-uFFOxh-03lGwa0b2ZwSEEElLin1AGA_iun4p0VGlUKpRyytteaJCTaoEQTzBK5NWhXP_-UBBPsyOVzTy26gpNfRKXngI-f8urQ/s640/appmesh.png" width="640" /></a></div>
AWS App Mesh works across the <a href="https://www.allthingsdistributed.com/2019/03/redefining-application-communications-with-aws-app-mesh.html">whole suite of compute services</a> available from AWS, from on-prem hardware, base EC2 instances up to AWS Fargate. However I'm not sure why there is no mention of AWS Lambdas in this diagram.<br />
<br />
After we had received this overview of service meshes and AWS App Mesh we had a discussion about if there was a tipping point number of services within your application before a service mesh becomes a valuable viable option. What was interesting was that the more we talked about what solutions it provided the more we were sold that you might as well use it from the beginning regardless of the number of services so that you could concentrate on writing code to solve business problems rather than writing infrastructural code!<br />
<br />
It was an excellent evening and I'm really looking forward to the next one, I hope we can gain a larger audience and therefore benefit from the additional experiences that such an audience bring.<br />
<br />
Thank you to <a href="https://www.meetup.com/AWS-User-Group-Liverpool/members/?op=leaders">Paul, Paul and Simon</a> for organising and Amazon for sponsoring.<br />
<br />
<br />Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-91969349415111683242019-09-07T13:26:00.000+01:002019-09-29T21:19:34.236+01:00ExpertTalks Liverpool - Let’s Talk Automation Strategy & Making Testability Our Mission<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFj0uapBEwZMklrvk1cTfD5tmMAJ5L7x6d8YzgkTjFEv74ZeD0E9JJsZE3RxstSTXDjKtkExwtiEidbcgiYZIxpBsESTKAON4V-IAco-iHdZyXylzvvuurVzM2HOgd7vvGmr8bDw/s1600/P1090611a.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1067" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFj0uapBEwZMklrvk1cTfD5tmMAJ5L7x6d8YzgkTjFEv74ZeD0E9JJsZE3RxstSTXDjKtkExwtiEidbcgiYZIxpBsESTKAON4V-IAco-iHdZyXylzvvuurVzM2HOgd7vvGmr8bDw/s200/P1090611a.JPG" width="133" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXYI2OpKWojltmXJVIO1gmojFMnaoCvc-KFDismWCVQQzrlmOAYzRgcs7GyMHWDxZ_zMzTPOJyaX7KBG3ZTkO9ak98K7xfjIGjydGSzHrUc200WzVcFF7aeTjTJ7qjBKpnJwYGYw/s1600/P1090614.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXYI2OpKWojltmXJVIO1gmojFMnaoCvc-KFDismWCVQQzrlmOAYzRgcs7GyMHWDxZ_zMzTPOJyaX7KBG3ZTkO9ak98K7xfjIGjydGSzHrUc200WzVcFF7aeTjTJ7qjBKpnJwYGYw/s320/P1090614.JPG" width="320" /></a>On Tuesday evening I attended an "<a href="https://www.meetup.com/ExpertTalks-Liverpool/events/261543366/">ExpertTalks Liverpool</a>" event organised by <a href="https://www.equalexperts.com/">Equal Experts</a>. They run a number of meetups across the UK and this was the third one in Liverpool. The evening started with an open bar (with some lovely craft ales available) and some sandwiches and wraps.<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJV7J2Cb2nEBqE8guvXMoHLEXYMfwr3EohtEjll1I9m4z80blr0DGXrkyNxbWPfcfgahtpT0SYMVTaVvAxQxi-yk9LCUK0v0QEFvMIbFxpHlL2RbFxF5THVDoTYXnpqBwR8Pxsg/s1600/P1090617.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJV7J2Cb2nEBqE8guvXMoHLEXYMfwr3EohtEjll1I9m4z80blr0DGXrkyNxbWPfcfgahtpT0SYMVTaVvAxQxi-yk9LCUK0v0QEFvMIbFxpHlL2RbFxF5THVDoTYXnpqBwR8Pxsg/s200/P1090617.JPG" width="200" /></a>First up was <a href="https://www.linkedin.com/in/samuel-durand-8300ba4a/">Samuel Durand</a> with a <a href="https://en.wikipedia.org/wiki/Lightning_talk">lightning talk</a> on "Making a SAAS", discussing the challenges when converting an in-house application into a multi-tenant 'service'. To be honest there was a huge amount of information presented in a very short amount of time so it was hard to keep up! He covered how you need to identify the differences in your clients and your processes to ensure your application can be configurable enough to cope. The storage of personal data and GDPR was covered not only in how the data is stored but also that you need to consider what personal information may be written to log files, etc. and the access controls that you need in place. What kind of technical support should you offer, are your clients expecting 24/7 or certain levels of support.<br />
<br />
He then moved on to cover the technical challenges that such a conversion experiences. Do you have a separate codebase for each client which is great for ensuring one client's new requirements don't interfere with another client's system but very difficult to ensure that all clients receive appropriate updates and patches. You've also got a high risk of code divergence.<br />
<br />
Other aspects covered were data isolation, asset/product storage, transactions and security. There was then a short break to get a refill from the bar and to do a bit of networking before the first of the two main talks.<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/358758293" width="560"></iframe><br />
<br />
<b>"Pyramids Are Ancient - Let’s Talk Automation Strategy" by <a href="https://twitter.com/FriendlyTester">Richard Bradshaw</a></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdihDfPT8gnxtD_sIUwoOe3a0ePFh-mxTMpH_Kuk_Xom18WJyW4Zyz0b3eA-IjkaFjY0fty1ST4VZDeZydsNY1jcDT4J6JWqA_5-X9VMw1KcOxkgesJfdFQtksHxUCAhq5p0t4xA/s1600/P1090623.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdihDfPT8gnxtD_sIUwoOe3a0ePFh-mxTMpH_Kuk_Xom18WJyW4Zyz0b3eA-IjkaFjY0fty1ST4VZDeZydsNY1jcDT4J6JWqA_5-X9VMw1KcOxkgesJfdFQtksHxUCAhq5p0t4xA/s200/P1090623.JPG" width="200" /></a></div>
Richard's talk was that you shouldn't just be focusing on one of the many different 'testing triangles' looking for the one-size-fits-all but instead investigate your context to ensure you test it in the right way.
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/358767171" width="560"></iframe><br />
<br />
After another trip to the bar and some more good conversation it was time for the final talk of the evening.<br />
<br />
<b>"Making Testability Our Mission" by <a href="https://twitter.com/northern_tester">Ash Winter</a></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgXI88ScusvCvtyAxdZAZv_-D__sye4BxAsq9YFLJGIwzVz2cODUiXUydBqflF0rlLi_9gqrIWBs1NM2zVXKIFgYGxSh0s5ojpp1etJVQW2-C5SFcchdd4bi3LRwA3kdxc_1TWg/s1600/P1090641.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgXI88ScusvCvtyAxdZAZv_-D__sye4BxAsq9YFLJGIwzVz2cODUiXUydBqflF0rlLi_9gqrIWBs1NM2zVXKIFgYGxSh0s5ojpp1etJVQW2-C5SFcchdd4bi3LRwA3kdxc_1TWg/s200/P1090641.JPG" width="200" /></a></div>
Ash focused not on how to test a system but on how to make a system more testable. How it's everyone's responsibility to examine the system under test and point out and advise on how to make it more easily testable. He ran through a number of principles which can be followed to make testable systems. Ash's slides for the presentation can be found on <a href="https://www.slideshare.net/AshWinter/making-testability-our-mission-redux">SlideShare</a>.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://www.slideshare.net/AshWinter/making-testability-our-mission-redux"><img border="0" data-original-height="621" data-original-width="639" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFlzqY3zYmsUIJW9vjvjBFaOWpioGT31CfhibdyxNRz29gRUMFXwjsEv3q_p0c9JZVXvJrz_Agw9z91xBYn7lI8SLY6wK2ZxEmVkUVtNg_osJ8DirstJ9uty2j5uT9by0ZktEcLQ/s320/ash-winter-presentation.png" width="320" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.slideshare.net/AshWinter/making-testability-our-mission-redux"><br /></a></td></tr>
</tbody></table>
<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/358774324" width="560"></iframe><br />
<br />
It was an excellent evening and I'd like to thank <a href="https://www.equalexperts.com/">Equal Experts</a> for organising and hosting the event and for putting the money behind the bar. Thanks to <a href="https://www.linkedin.com/in/samuel-durand-8300ba4a/">Samuel</a>, <a href="https://twitter.com/FriendlyTester">Richard </a>and <a href="https://twitter.com/northern_tester">Ash </a>for presenting such an interesting and informative evening.Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-9481930079182864922019-07-13T16:15:00.002+01:002019-07-17T09:04:07.863+01:00Lancashire Tech Talks #7 - Behaviour Driven Development, AI For Ordinary Folk & The Mobile Is Dead<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxaJYs6ar7JIEHm-xVaoA7hJ_s53yuyBb_Pi3mQFPdJAunEqd9JGGbxtY3lRmGN9IA8v_iO-fgNz1LLGBq9f5_VuAded62GdI6ZB6S4q2DzF6gxnl7zSK0Le5RGg3l8RfYF4k7NA/s1600/P1090352.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxaJYs6ar7JIEHm-xVaoA7hJ_s53yuyBb_Pi3mQFPdJAunEqd9JGGbxtY3lRmGN9IA8v_iO-fgNz1LLGBq9f5_VuAded62GdI6ZB6S4q2DzF6gxnl7zSK0Le5RGg3l8RfYF4k7NA/s200/P1090352.JPG" width="200" /></a></div>
At 6pm on Thursday evening I attended the seventh <a href="https://www.meetup.com/Lancashire-Tech-Talks/">Lancashire Tech Talks</a> (<a href="https://twitter.com/lancstechtalks">@LancsTechTalks</a>) based at <a href="https://www.grahambrown.com/uk/">Graham & Brown</a> in Blackburn. It was a tech meetup entitled "<a href="https://www.meetup.com/Lancashire-Tech-Talks/events/262193313/">Behaviour Driven Development, AI For Ordinary Folk & The Mobile Is Dead</a>" with three guest speakers and they also provided food and drinks.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGRYWg71DOBxHpJ9gY478dMO2UvD6bcEki3K0NHm9DoWytbNeodOI9RqJfnn8xSdHSmDhalXv6BHUN_2GqcL3S_GcUw5Dq_3oViATEcD8uusBD7fue5pVGCNGzoO0lDaVGFyvqsg/s1600/P1090358.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGRYWg71DOBxHpJ9gY478dMO2UvD6bcEki3K0NHm9DoWytbNeodOI9RqJfnn8xSdHSmDhalXv6BHUN_2GqcL3S_GcUw5Dq_3oViATEcD8uusBD7fue5pVGCNGzoO0lDaVGFyvqsg/s200/P1090358.JPG" width="200" /></a></div>
Graham & Brown have a great conference room big enough to seat over a hundred people and there were not many empty seats once the talks had started. The room is nicely decorated (not surprising really considering Graham & Brown are a wallpaper and wall-covering company) but the room was also light and airy.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBA8u7GJ0Nimf8Mbi45HmJWACiRe5kJxX57YU3tRpbwYeCQrZKol2cinhf2c-YZCmUFZIOjFbOjkjcYdEMdrbDscMJIeL7TyGfyomKDbuyRw-M_iTeEDGXUO6no_75h0RwW99-Pw/s1600/P1090359.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBA8u7GJ0Nimf8Mbi45HmJWACiRe5kJxX57YU3tRpbwYeCQrZKol2cinhf2c-YZCmUFZIOjFbOjkjcYdEMdrbDscMJIeL7TyGfyomKDbuyRw-M_iTeEDGXUO6no_75h0RwW99-Pw/s200/P1090359.JPG" width="200" /></a></div>
When I arrived there was a good buzz in the room with people conversing in small groups, and the organisers and speakers setting up. Cold soft drinks and beers were provided and what I particularly liked was that recycling of the cans and bottles was being encouraged.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHH51jtbvdTJ1IISVFvNNVCs9JjrexPfT8u4fDOe2xWlQJm8AQWPLyAIpAwDBe92FL22UNjudLDdOqskkg1CdtornZRQ8-vUYCntTNMyJxPK_sRQJJcXOxN_aq7muX3BzNQlstxg/s1600/P1090363.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHH51jtbvdTJ1IISVFvNNVCs9JjrexPfT8u4fDOe2xWlQJm8AQWPLyAIpAwDBe92FL22UNjudLDdOqskkg1CdtornZRQ8-vUYCntTNMyJxPK_sRQJJcXOxN_aq7muX3BzNQlstxg/s200/P1090363.JPG" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMzCIqLyX7pl7TThqmxEG-SxGVl8irnoIferMTU2SooyhezIXfanKKSHzqP4ieSISP8ymW3sWLty5DBATr2nCgJam5_JgHq2gwYid7U8Zc_oNPgEJHdtmrWSyM_BH2Hbb5GpTHxQ/s1600/P1090364.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMzCIqLyX7pl7TThqmxEG-SxGVl8irnoIferMTU2SooyhezIXfanKKSHzqP4ieSISP8ymW3sWLty5DBATr2nCgJam5_JgHq2gwYid7U8Zc_oNPgEJHdtmrWSyM_BH2Hbb5GpTHxQ/s200/P1090364.JPG" width="200" /></a>The evening started with the organisers introducing themselves and plotting out the course of the evening and then the stage was handed over to the sponsors, <a href="https://lancashirelep.co.uk/">Lancashire Enterprise Partnership</a> and <a href="https://www.boostbusinesslancashire.co.uk/">Boost</a>. Next were the talks.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQrIJ5I87SSfAGHlbNIMRBoR57RZ59yJB_JA2kn3JGGSy6oSVZ8HQg_qXLiUssxv65V4K95k0zQHtskDivwaI9XAnOpbEEoyC1CgiMlZAP2SHN9XJWzxu2AtTGU5XNLFGoSwu3SA/s1600/P1090365.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQrIJ5I87SSfAGHlbNIMRBoR57RZ59yJB_JA2kn3JGGSy6oSVZ8HQg_qXLiUssxv65V4K95k0zQHtskDivwaI9XAnOpbEEoyC1CgiMlZAP2SHN9XJWzxu2AtTGU5XNLFGoSwu3SA/s320/P1090365.JPG" width="320" /></a></div>
<b>Behaviour Driven Development - <a href="https://www.linkedin.com/in/patrickblain/">Patrick Blain</a></b><br />
<a href="https://cucumber.io/docs/bdd/overview/">Behaviour Driven Development</a> or BDD for short is a process which encourages collaboration, helps build the right thing and build the thing right (through the use of testing, coding practices, etc.). It also defines a structure for documentation (using the <a href="https://cucumber.io/docs/gherkin/reference/">Gherkin language</a>) as well as lending itself to automated testing.<br />
<br />
BDD is an effective way to tease out requirements and to drive it through to working software. It's not a 'one size fits all' approach however and works best when all the project people are together rather than working in silos. It's also a good fit with continuous delivery and other fast feedback development techniques.<br />
<br />
Patrick then ran through some Gherkin examples explaining what <a href="https://cucumber.io/docs/gherkin/reference/#given">Given</a>/<a href="https://cucumber.io/docs/gherkin/reference/#when">When</a>/<a href="https://cucumber.io/docs/gherkin/reference/#then">Then </a>means and how to use them as well as explaining <a href="https://cucumber.io/docs/gherkin/reference/#feature">Feature</a>, <a href="https://cucumber.io/docs/gherkin/reference/#background">Background</a>, <a href="https://cucumber.io/docs/gherkin/reference/#and-but">And/But</a> & <a href="https://cucumber.io/docs/gherkin/reference/#scenario-outline">Scenario</a>. He explained that TDD focuses on implementation but BDD focuses on behavioural outcomes. One thing that I particularly liked was that Patrick didn't just focus on the positives of BDD he also pointed out some common pitfalls such as not using Given/When/Then correctly, multiple With/Then pairs and too many And/But commands. You need to try and focus the tests on the behaviour rather than the implementation as well as being conscious of not having loads of scenarios for one feature.<br />
<br />
Benefits of BDD include 'living documentation' - readable behaviour descriptions which are easy to understand by developers and used to test that the implmentation works as expected. Due to the suite of tests it makes code safer and easier to change and maintain and also makes releases easier and faster. Patrick's slides are <a href="https://www.dropbox.com/s/np7az1azttiu155/Behaviour%20Driven%20Development%20-%20Patrick%20Blain.pdf?dl=0">available via Dropbox</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEku_nG0JfJEbvxR7HHpH5xgTQV1dSo0FhiggUwd96kTOcKBYAd94NspVNVVg44BfAcXWuEvQvW0Kt4mYP_OUHq_qzBP4kGIZtAIpJj9nwDuP1ZVTbtxSX7x9bU6yZ-wgPJVlN6A/s1600/P1090367.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEku_nG0JfJEbvxR7HHpH5xgTQV1dSo0FhiggUwd96kTOcKBYAd94NspVNVVg44BfAcXWuEvQvW0Kt4mYP_OUHq_qzBP4kGIZtAIpJj9nwDuP1ZVTbtxSX7x9bU6yZ-wgPJVlN6A/s200/P1090367.JPG" width="133" /></a></div>
After Patrick's talk it was time for food and networking. Takeaway pizza and garlic bread were available but more importantly one of the staff members from Graham & Brown had brought in a load of homemade Pakistani buffet food - samosas, kebabs, bhajis, etc. They were absolutely delicious!<br />
After plating up a load of the snacks it was time to eat, mingle and chat for about thirty minutes before the next two talks.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju0AzR2hTqE4ZkebQnBQGXdEpoP0pfVQoxYEMj8sXfSGwANFXOQP1WgAqdZq7kdx7l13Y02AhBGwQzvuvjWvY_8bQljzvuhyphenhyphenxBvQHhLtQCxoJMRQTRX7wMLa5D2KGAGFoJZUReZQ/s1600/P1090369.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju0AzR2hTqE4ZkebQnBQGXdEpoP0pfVQoxYEMj8sXfSGwANFXOQP1WgAqdZq7kdx7l13Y02AhBGwQzvuvjWvY_8bQljzvuhyphenhyphenxBvQHhLtQCxoJMRQTRX7wMLa5D2KGAGFoJZUReZQ/s320/P1090369.JPG" width="320" /></a></div>
<b>AI for ordinary folk - <a href="https://www.linkedin.com/in/carlwhalley/">Carl Whalley</a></b><br />
Carl's talk was an introduction to AI & machine learning (ML), explaining the concepts behind it but not diving too technically deep. He said that AI was overhyped but ML was underhyped by the media even though you need ML to get AI. He explained weightings and levels of wrongness, and how they are used to 'learn'. He also covered the difference between supervised & unsupervised learning.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRyhMhTphIR_Scuc6sTHTcYwdY91Z3TAmK-UyHQu9VDcTzbc9aGfz2gDkOfTftyCQWHuAJUwP2e_LjdA3sNRoelXaKi-Rl2qOXKmRz5mCOv_YJF8J0OXzs2KjaHNLBxgYHJU5Ajw/s1600/P1090371.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRyhMhTphIR_Scuc6sTHTcYwdY91Z3TAmK-UyHQu9VDcTzbc9aGfz2gDkOfTftyCQWHuAJUwP2e_LjdA3sNRoelXaKi-Rl2qOXKmRz5mCOv_YJF8J0OXzs2KjaHNLBxgYHJU5Ajw/s320/P1090371.JPG" width="320" /></a></div>
<b>The death of the mobile phone and what it means ... TO US ALL - <a href="https://www.linkedin.com/in/leigh-rathbone-630690b/">Leigh Rathbone</a></b><br />
The final talk was from Leigh about how the mobile phone has had it's day and it's time to look past the mobile and see what the future looks like for software development and testing. He covered voice control with Alexa, self-driving cars, wearable tech, etc. and pointed out how creating realistic testing environments was key in order to prove that it works correctly. <a href="https://prezi.com/rvk6rfy8o4qz/lancs-tt/">Leigh's slides</a> are available on Prezi.<br />
<br />
It was a superb evening; three excellent speakers with interesting content, great food & drink and nice to be out and about talking tech to like-minded folk. Can't wait for <a href="https://www.meetup.com/Lancashire-Tech-Talks/">the next one</a> currently scheduled for September! Thanks again to Andy & HoiYen for organising, LEP & Boost for sponsoring, and Graham & Brown for hosting.Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-84637737687285608522016-07-06T21:30:00.000+01:002016-07-06T21:30:38.439+01:00Setting up Spring application & webapp contexts correctly in Java integration testsWhen integration testing <a href="https://spring.io/">Spring </a>web applications you would often pull in the applicationContext.xml and the appropriate *-servlet.xml file using the <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/test/context/ContextConfiguration.html">@ContextConfiguration</a> annotation within the junit test class. The problem is that this loads both sets of beans into the same context which is different from when tcServer loads the webapp for real. In a real server, the application context is loaded into the 'root' context and each servlet into it's own separate context which is dependent on the root (see my <a href="http://blog.andrewbeacock.com/2010/09/spring-autowiring-component-scanning.html">set of previous articles</a> for more details).<br />
<br />
To properly set up the contexts in a test environment so that they are loaded and treated the same as in a running tcServer you need to tell the test that it's a webapp test using the <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/test/context/web/WebAppConfiguration.html">@WebAppConfiguration</a> annotation and then use the <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/test/context/ContextHierarchy.html">@ContextHierarchy</a> annotation to set up the order in which to load the contexts:<br />
<br />
<pre>
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextHierarchy({
@ContextConfiguration(locations = { "/applicationContext.xml" }),
@ContextConfiguration(locations = { "/beacock-servlet.xml" })
})
public class BeacockControllerIntegrationTest {
....
}
</pre>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-63417439148454650672013-01-13T21:43:00.001+00:002013-01-13T21:43:51.791+00:00cvc-complex-type.2.4.c issues - a few things to checkI've battled with the Spring cvc-complex-type.2.4.c issue on a few occasions but with them far enough apart that I can't remember what the steps are to solve it. This time round I thought I would write it down...<br />
<br />
You are writing a Spring-based app and you have some of your bean declarations in XML (I also use annotations but that's not important here). You wire your beans, you write your code and you build your application. Everything compiles and builds correctly, you run up your app in your container (in my case the dreaded Glassfish) and BOOM:<br />
<pre>Caused by: org.xml.sax.SAXParseException;
lineNumber: 30; columnNumber: 76;
cvc-complex-type.2.4.c: The matching wildcard is strict,
but no declaration can be found for element 'jms:listener-container'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.
createSAXParseException(ErrorHandlerWrapper.java:198)
</pre>
Here are a few things to check:<br />
<br />
Check that you have a element in your XML of the mentioned type, in my case it complained about 'jms:listener-container' and I correctly had this in the config:
<br />
<pre><jms:listener-container
acknowledge="transacted"
concurrency="5"
connection-factory="jmsAsyncMLQueueConnectionFactory"
destination-resolver="jndiDestinationResolver"/>
</pre>
Check that you have the mentioned namespace declared correctly, it complained about 'jms:listener-container' and I correctly had this in the beans header part of the XML:
<br />
<pre><beans
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemalocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
">
....
</pre>
As you can see I've declared the xmlnss:jms and then put the correct schema location URL in as well.<br />
<br />
None of this was the problem, in fact the problem wasn't to do with mistakes in the XML configuration, or incorrect namespace URLs or even whether the correct SAX parser was being used (look out for this one though).<br />
<br />
The problem was that the spring jms schema file couldn't be found, the Spring XML parser doesn't go to the internet to get the schema files, it looks for them in the Spring jars. I'd completely forgotten to declare the use of sping-jms in my maven config and so it couldn't find the Spring JMS schema.<br />
<br />
By adding the following to my Maven project sorted out the issue:<br />
<br />
<pre>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
</dependency>
</pre>
Why couldn't the XML parser have told me that it couldn't find one of the schema files?!?! >:OAndrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com3tag:blogger.com,1999:blog-11593374.post-20539858266269387632012-03-25T21:33:00.002+01:002012-03-25T21:35:02.971+01:00Java Date & Time manipulation using Apache Velocity<a href="http://velocity.apache.org/">Apache Velocity</a> is an excellent tool if you need to bang out a quick bit of XML output or a text file with a particular layout and you don't want to do it all in Java. You create a <a href="http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocity_template_language_vtl:_an_introduction">Velocity template</a> with your text in it and use various place-holders for the dynamic data that will be passed into it from your Java code. Velocity them merges the two together to give you a nicely formatted custom-filled file/document/SOAP request/etc.<br />
<br />
It's a great tool but does have it's quirks and downsides and one that I hit upon recently was how to display dates in a particular format. You can call methods on any Java object that you pass to the template but only if it's in the Java bean standard format of <code>getX()</code> and the Date formatting methods don't follow this standard.<br />
<br />
The solution was found within the optional Velocity-Tools library - DateTool. <a href="http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/DateTool.html#format%28java.lang.String,%20java.lang.Object,%20java.util.Locale,%20java.util.TimeZone%29">DateTool has a number of format methods</a> on it which can twist the dates and times into any format that you need, here are some examples:<br />
<br />
<b>Date & Time together</b><br />
<br />
This in the template:<br />
<pre class="brush:javascript">$dateTool.format('default', $testDate)
$dateTool.format('full', $testDate)
$dateTool.format('long', $testDate)
$dateTool.format('medium', $testDate)
$dateTool.format('short', $testDate)</pre>Gives this in the output:<br />
<pre>03-Jan-2012 00:00:00
Tuesday, 3 January 2012 00:00:00 o'clock GMT
03 January 2012 00:00:00 GMT
03-Jan-2012 00:00:00
03/01/12 00:00</pre><br />
<b>Just Dates</b><br />
<br />
This in the template:<br />
<pre class="brush:javascript">$dateTool.format('default_date', $testDate)
$dateTool.format('full_date', $testDate)
$dateTool.format('long_date', $testDate)
$dateTool.format('medium_date', $testDate)
$dateTool.format('short_date', $testDate)</pre>Gives this in the output:<br />
<pre>03-Jan-2012
Tuesday, 3 January 2012
03 January 2012
03-Jan-2012
03/01/12</pre><br />
<b>Just Times</b><br />
<br />
This in the template:<br />
<pre class="brush:javascript">$dateTool.format('default_time', $testDate)
$dateTool.format('full_time', $testDate)
$dateTool.format('long_time', $testDate)
$dateTool.format('medium_time', $testDate)
$dateTool.format('short_time', $testDate)</pre>Gives this in the output:<br />
<pre>00:00:00
00:00:00 o'clock GMT
00:00:00 GMT
00:00:00
00:00</pre>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com2tag:blogger.com,1999:blog-11593374.post-52741022236749172892012-01-25T23:47:00.003+00:002012-01-26T14:10:11.888+00:00Beware of JavaScript's parseInt function - 010 does not equal 10...I use JavaScript & jQuery quite a bit in my day job helping to add a bit of 'shiny' to our web applications. One feature that I added recently kept a track of the percentages that you had typed in the form. It told you at the bottom of the page how much percentage you had left - I used JavaScript's parseInt function to help me in this respect.<br />
<br />
As the application passed through system test it was found that if you typed '020' as a percentage my application said that you had 84% left to assign rather than the expected 80% - any ideas what's going on?<br />
<br />
Yes that's right - the leading zero was causing <a href="http://www.w3schools.com/jsref/jsref_parseInt.asp">parseInt</a> to treat the number as an octal (base 8) number and so 020 was two lots of 8 = 16. It appears that this <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt#ECMAScript_5_Removes_Octal_Interpretation">octal recognition is being deprecated</a> but who knows when it will actually go so for now I've had to add ", 10" (i.e. a decimal radix) to the end of all of my parseInt calls:<br />
<pre>parseInt(percentage, 10);
</pre>Double check any code that you use which uses parseInt to make sure it doesn't trip you up in the same way that I way!Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-22638549819465615182011-10-31T22:32:00.000+00:002011-10-31T22:32:45.780+00:00Do 'is' boolean methods work in JSPs with JSTL?When coding in <a href="http://www.oracle.com/technetwork/java/jstl-137486.html">JSTL</a> you often want to use conditional logic (I'm thinking <c:if> and the like) to be able to structure your page correctly. Auto-generated getter & setter methods will normally create isX() methods for the getters of boolean values (at least in <a href="http://www.eclipse.org/">Eclipse</a> it does) but can you access this method directly from JSTL without writing a getX() version?</c:if><br />
<br />
Does <a href="http://www.oracle.com/technetwork/java/jstl-137486.html">JSTL</a> support 'is' boolean methods though? Ask a random poll of Java we developers and you will get conflicting answers so I decided to investigate, want the short answer?<br />
<br />
<b>YES</b> - JSTL does support accessing isX() methods directly as if you were accessing a getX() method, but only if the return type of the isX() method is a <a href="http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">primative boolean</a>. If you return an object of any kind (such as <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html">Boolean</a> isObjectBooleanTrue()) then JSTL fails to find the method and will give you a rather nasty JSP exception:<br />
<blockquote class="tr_bq">
<div class="MsoNormal">
javax.el.<wbr></wbr>PropertyNotFoundException: The class 'com.andrewbeacock.BooleanTest' does</div>
not have the property 'objectBooleanTrue'.</blockquote>
So yes, 'is' methods work in JSTL but make sure you ONLY return <a href="http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">primitive booleans</a> from them.<br />
<br />Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-78278058031983272942011-10-27T20:29:00.000+01:002011-10-27T20:29:01.495+01:00How to stop Eclipse reformating your Java enumerations & commentsEclipse is a wonderful IDE for the Java language and I’ve used it daily for at least the past 4 years but it does have some 'issues'. One is regarding it’s code formatting (or reformatting) support, normally it does a great job of putting stuff in the right place but there are occasions where it just fails to get it right.<br />
<br />
<b>Enumerations</b><br />
When I write enums I like to have each item on it's own row, I find it's easier to read and amend in the future:<br />
<pre class="brush:java">public enum Family {
MOTHER,
FATHER,
DAUGHTER,
SON;
}
</pre>But Eclipse has other ideas and formats it so that it looks like this:<br />
<pre class="brush:java">public enum Family {
MOTHER, FATHER, DAUGHTER, SON;
}
</pre>A way to get around this (and any other times where you have a few lines of code that you don't want collapsing into one is to add the double-slash style code comments to the end of each line: <br />
<pre class="brush:java">public enum Family {
MOTHER, //
FATHER, //
DAUGHTER, //
SON;
}
</pre><b>Block comments</b><br />
<br />
I recently wanted to have a decent sized chunk of XML stored within Java's block comments (/* ... */) so that I could refer to it as I coded a mapping class. Everytime I saved the class Eclipse reformatted my XML so that it looked like someone had been sick on the page.<br />
<br />
After a little digging I found this gem buried in the original coding conventions document from Sun back in 1997:<br />
<blockquote>Block comments can start with /*-, which is recognized by indent(1) as the beginning of a block comment that should not reformatted.</blockquote> Taken from section 5.1.1 of <a href="http://www.oracle.com/technetwork/java/codeconventions-150003.pdf">Java Code Conventions</a><br />
<br />
Now I'm pretty damn sure that Eclipse doesn't use indent for it's layout but I tried it anyway and it works a treat! Simply add the minus sign to the start of the block comment section and it will leave the whole block comment alone:<br />
<pre class="brush:java">/*-
<xml>
<some lovely="formatted">
XML which we don't want
<some>
<silly formatter="to touch"/>
</xml>
*/
</pre>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com2tag:blogger.com,1999:blog-11593374.post-87726492640432796312011-08-17T21:15:00.000+01:002011-08-17T21:15:03.683+01:00Always note DNS server settings offlineHad a strange experience this evening - complete loss of the internet. My router was suggesting that I had ASDL connectivity, and even an IP address but I wasn't able to load any websites. After a bit of debugging with the help of a remote friend I figured out that I wasn't able to connect to <a href="http://blog.andrewbeacock.com/2009/05/replace-your-broadband-providers-dns.html">my OpenDNS name servers</a> and so google.com wasn't resolving for me.<br />
<br />
I updated my router with <a href="http://code.google.com/speed/public-dns/">Google's DNS settings</a> and was back in play - just goes to show that what appears to be an ISP outage can be a case of name servers not being available at that time.<br />
<br />
Make sure you make a note of a few free DNS server details (i.e. both <a href="http://blog.andrewbeacock.com/2009/05/replace-your-broadband-providers-dns.html">OpenDNS</a> and <a href="http://code.google.com/speed/public-dns/">GoogleDNS</a>) offline so you can try them out if you ever end up 'offline'!Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-25367276527333957882011-05-14T21:32:00.000+01:002011-05-14T21:32:59.648+01:00Misleading wiring messages with aliased Spring DataSourcesWhen accessing databases in <a href="http://www.springsource.org/">Spring</a> you commonly use a <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/jdbc.html#jdbc-introduction">dataSource.xml file</a> of some description to hold the XML <a href="http://en.wikipedia.org/wiki/Stanza">stanzas</a> describing the connection details to various databases or schemas.<br />
<br />
When dealing with multiple dataSource requirements you might find that more than one logical dataSource bean name actually points to the same physical connection. Rather than define multiple datasource stanzas with exactly the same details, Spring allows the use of the <alias> element to point easily to an existing bean but use a different name:<pre class="brush:xml"><bean id="personDataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@database:port:SID" />
<property name="username" value="USER" />
<property name="password" value="PASS" />
<property name="validationQuery" value="select 1 from dual"/>
</bean>
<alias alias="customerDataSource" name="personDataSource"/>
</pre><b>BUT (this is the whole point of this blog post really!)</b><br />
<br />
If you get wiring errors when Spring tried to wire data sources into other beans it DOESN'T see aliased beans as first class citizens, when the error reports which data sources are available it won't list the aliased names, suggesting that you actually have less data sources than you really do!<br />
<br />
So although aliases are great (and have saved me loads of lines of duplicated XML config) make sure you consider that they won't be shown in lists of 'available data sources'.Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-5457029242959938822011-05-01T21:34:00.000+01:002011-05-01T21:34:51.732+01:00Sound advice for a source code commit frequencyA <a href="http://twitter.com/blarti">colleague</a> of mine commented recently in a discussion on how often one should commit their source code:<br />
<blockquote>commit on keyup<br />
- always tends to keep everything as up to the minute as possible</blockquote>Classic! and yes it was tongue in cheek advice!Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-27217745141272465632011-03-28T20:27:00.000+01:002011-03-28T20:27:00.586+01:00Using & comparing enumerations (enums) with JSTLOften in your <a href="http://www.oracle.com/technetwork/java/index-jsp-135995.html">JSTL</a> pages you will want to test a value of a particular variable before displaying something on the page. Often you are comparing against primitive types or other objects but what if you want to compare against an <a href="http://download.oracle.com/javase/tutorial/java/javaOO/enum.html">enumerated type</a>?<br />
<br />
Attempting to access the enumeration directly as <code>Colour.BLUE</code> doesn't work as the class/enum isn't available but what you can do it compare objects against their label or enum name.<br />
<br />
If we have a Colour enumeration:<br />
<pre class="brush:java">public enum Colour {
RED, GREEN, BLUE
}</pre>and we have a car object which has a getColour() method on it (returning the enumerated type) we can test against it in JSTL by using the specific name:<br />
<pre class="brush:xml"><c:if test="${car.colour eq 'BLUE'}"></pre>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-42339110936187645652011-03-21T23:15:00.000+00:002011-03-21T23:15:12.545+00:00Keyboard shortcut for 'paste as plain text' in PidginI use <a href="http://www.pidgin.im/">Pidgin</a> at work for communicating with my remote colleagues and I regularly paste code snippets and log file output into the Pidgin window. Often the text formats completely wrong and you end up sending the recipient a page of garbage rather than the real text.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu6zP0odA6C672pvY0mIzz52CvI5OVdkxsDDpEMISLVyiM-JA1j5GFhd4Yd9Rok0sQYldZ8Z6BGqtcQbkiOt4xmyUzDt5Ud9ZQ6nECuCPlmObo80oLEju4sbHX-HVDGOQ-leL24Q/s1600/pidgin+paste+as+plain+text.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu6zP0odA6C672pvY0mIzz52CvI5OVdkxsDDpEMISLVyiM-JA1j5GFhd4Yd9Rok0sQYldZ8Z6BGqtcQbkiOt4xmyUzDt5Ud9ZQ6nECuCPlmObo80oLEju4sbHX-HVDGOQ-leL24Q/s320/pidgin+paste+as+plain+text.png" width="320" /></a></div><br />
Pidgin has a right-click context menu option for getting round this called 'paste as plain text' which normally does the trick but what if you normally use CTRL-V to paste your text in? After 2 seconds of experimentation today I found that CTRL-SHIFT-V is the keyboard shortcut for 'paste as plain text', I now feel complete...Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-53583951551762714772011-02-11T21:42:00.001+00:002011-02-11T21:42:57.393+00:00Embedding a Google Docs spreadsheet in BloggerBlogger is an excellent free blogging platform but if you want anything 'dynamic' then it starts to get in the way. One thought I've had recently was to see how I could share information captured in Google Docs Spreadsheet with Blogger.<br />
<br />
I've a few ideas which will take a few posts to explain, so let's start with the most basic - embedding a Google Spreadsheet direct into Blogger.<br />
<br />
Access the spreadsheet in Google Docs that you want to expose in Blogger, I've chosen a simple table of the most popular programming languages in 2010:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGSTlwwyxFKEqbIbIHHFwjUDi2jNG4l9MvgL-mG7msZWn74V3tey0UwjfiujvFBIQM7tEQRxP2l0JXbdhWJ5VsyKoBXZbi1pE-d1XGxHfjtBPbfDInsB00XMQdOTRRP63Wx_0H-A/s1600/spreadsheet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGSTlwwyxFKEqbIbIHHFwjUDi2jNG4l9MvgL-mG7msZWn74V3tey0UwjfiujvFBIQM7tEQRxP2l0JXbdhWJ5VsyKoBXZbi1pE-d1XGxHfjtBPbfDInsB00XMQdOTRRP63Wx_0H-A/s320/spreadsheet.png" width="320" /></a></div><br />
Next you'll want to share this spreadsheet with the rest of the world by publishing it as a web page:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5hKmurBMGq7Nnmklf-dKQYaQJ9iGapaHuvfld_fN9tuxin5ZcRT8MkFodYFtrMaXdUQleEDXZdNXbEnaeHzJ-30KyUXaze6J8RNA6eGjO6j6AaYrsVvu-ZRFoVHoSpn1aczYPA/s1600/publish.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV5hKmurBMGq7Nnmklf-dKQYaQJ9iGapaHuvfld_fN9tuxin5ZcRT8MkFodYFtrMaXdUQleEDXZdNXbEnaeHzJ-30KyUXaze6J8RNA6eGjO6j6AaYrsVvu-ZRFoVHoSpn1aczYPA/s320/publish.png" width="320" /></a></div><br />
Now you need to select the "HTML to embed in a page" option and copy the HTML code into the clipboard:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8_DsKYynFlfbyUtf6hwrN3xm3hQeQdM0pQ1wQL4aHiKKAr3b9UTl_47L4H2e87jqS5LqIwCdpqdHCWB1GO15nbdEmIHCekDsm4Xv3zMlFpLVHhs6LkTRyqfi_qU7j6qsikyecZw/s1600/publish+as+a+webpage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8_DsKYynFlfbyUtf6hwrN3xm3hQeQdM0pQ1wQL4aHiKKAr3b9UTl_47L4H2e87jqS5LqIwCdpqdHCWB1GO15nbdEmIHCekDsm4Xv3zMlFpLVHhs6LkTRyqfi_qU7j6qsikyecZw/s320/publish+as+a+webpage.png" width="314" /></a></div> Open a new post in blogger and ensure that the "Edit HTML" tab is selected and paste the code in:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFhyRPQKP88KFuo3cxLjPVMWWr8bh3h7LZbes4HTSTp6NSdIln-ksiZmlzup9etw092M3dKEnCjVi0lS9rh6NuPLzgZw9vHkXLtnvcOXBy3d9a9-nVKXMDbje9wYj30nc5_-_9EA/s1600/blogger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFhyRPQKP88KFuo3cxLjPVMWWr8bh3h7LZbes4HTSTp6NSdIln-ksiZmlzup9etw092M3dKEnCjVi0lS9rh6NuPLzgZw9vHkXLtnvcOXBy3d9a9-nVKXMDbje9wYj30nc5_-_9EA/s320/blogger.png" width="320" /></a></div><br />
Now publish your post and your spreadsheet will be visable in your blog post:<br />
<br />
<iframe frameborder="0" height="300" src="https://spreadsheets.google.com/pub?key=0AlvsnAh0wPwVdF9GSlp2Y0Z4ejBtX1RTRUUxbjY1cXc&hl=en&single=true&gid=0&output=html&widget=true" width="500"></iframe><br />
<br />
I didn't say it would be pretty though did I? ;)<br />
<br />
That's the most basic way of doing it, and any changes you make in Google Docs will be reflected in the Blogger page. In the next few posts I'll show how a little HTML & JavaScript coding with Google Visualisations means we can have a much neater looking table as well as access to producing some graphs of the data.Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com9tag:blogger.com,1999:blog-11593374.post-91730973979721741832010-11-08T21:53:00.000+00:002010-11-08T21:53:34.819+00:00How to use MatchMode in your JPA/Hibernate Restrictions & Criteria queriesBack in July I blogged about <a href="http://blog.andrewbeacock.com/2010/07/how-to-do-andor-type-sql-queries-using.html">how to do AND/OR type SQL queries using Hibernate AND/OR JPA using disjunctions</a>. If you looked at the example code you will have seen that I was appending "%" as the wildcard operator in my <a href="http://docs.jboss.org/hibernate/stable/core/reference/en/html/querycriteria.html#querycriteria-narrowing">Restrictions</a>.<br />
<br />
Since then I've used <a href="http://docs.jboss.org/hibernate/stable/core/reference/en/html/querycriteria.html#querycriteria-narrowing">Restrictions</a> a couple more times and wondered if there was a better way of specifying them other than string concatenation.<br />
<br />
Well there is and it's with the use of the <a href="http://docs.jboss.org/hibernate/stable/core/api/org/hibernate/criterion/MatchMode.html">MatchMode</a> class.<br />
<br />
Rather than this code:<br />
<pre class="brush:java">import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
Criteria criteria = session.createCriteria(Product.class);
criteria.add(
Restrictions.disjunction()
.add(Restrictions.ilike("code", codeOrName + "%"))
.add(Restrictions.ilike("name", "%" + codeOrName + "%"))
);
return criteria.list();</pre>You can now write:<br />
<pre class="brush:java">import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
Criteria criteria = session.createCriteria(Product.class);
criteria.add(
Restrictions.disjunction()
.add(Restrictions.ilike("code", codeOrName, MatchMode.START))
.add(Restrictions.ilike("name", codeOrName, MatchMode.ANYWHERE))
);
return criteria.list();</pre>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-4945319152381347852010-11-03T20:53:00.000+00:002010-11-03T20:53:17.714+00:00Accessing & iterating over a Java Map in a JSP page with JSTLWhen you are coding JSP pages using <a href="http://java.sun.com/products/jsp/jstl/">JSTL</a> one thing you use a lot is the <a href="http://blog.andrewbeacock.com/2009/04/jstl-foreach-looping-tricks-using.html"><c:foreach> tag</a>. This tag a great for iterating over <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html">Lists</a> or <a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html">Sets</a> but what do you do when you want to display the contents of a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html">Map</a>?<br />
<br />
Firstly you need to decide how you are going to use the Map. Do you want to access a 'value' stored within the Map based on a known key or iterate over the Map displaying both key and value?<br />
<br />
<b>Access a Map based on a 'key'</b><br />
<br />
This one is pretty straight forward you just need to know the JSTL syntax:<br />
<pre class="brush:xml">${aMapFullOfKeysAndValues[yourKnownKey]}
</pre>Two key points:<br />
<ul><li> The key is an existing JSTL variable or a quoted string</li>
<li> You use square brackets at the end of the Map name</li>
</ul><b>Iterate over a Map pulling out the 'key' & 'value'</b><br />
<br />
This is a little more complex, note the name of the variable that is filled on each pass through the Map ('entry'):<br />
<pre class="brush:xml"><c:foreach items="${aMapFullOfKeysAndValues}" var="entry">
${entry.key} - ${entry.value}
</c:foreach></pre>Four key points:<br />
<ul><li> The name of the Map is placed as the 'items' attribute of the forEach</li>
<li> To access the 'key' object use ${entry.key}</li>
<li> To access the 'value' object use ${entry.value}</li>
<li> If either the key or value is a complex object, simply walk into it: ${entry.value.surname}</li>
</ul>Hopefully that has demystified it a little, please post a comment if you found this post useful or I've missed something out!Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com1tag:blogger.com,1999:blog-11593374.post-52769374376996072412010-10-08T22:04:00.000+01:002010-10-08T22:04:38.027+01:00Spring Autowiring & Component Scanning Problems - Part 6: The RemedyPart 5 can be found <a href="http://blog.andrewbeacock.com/2010/10/spring-autowiring-component-scanning.html">here</a><br />
<br />
So what can you do about root context beans not being wired correctly?<br />
<br />
One solution is to ensure that all your root context beans have their autowiring specified via XML, either with explicit <property> elements or autowire="byType" or autowire="byName" XML attributes, but this is a bit of a backward step considering how annotation centric Spring is becoming.<br />
<br />
You could enable component scanning (via the <context:component-scan> XML element) and go through the beans marking them with the <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/stereotype/Component.html">@Component</a> family of annotations so that the <a href="http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-autowired-annotation">@Autowired</a> statements are picked up. You will also need to remove the XML-based bean definitions from the context files otherwise you will end up with two conflicting beans - one loaded due to the XML declaration and another loaded due to component scanning.<br />
<br />
Or you could switch on 'annotation awareness' by adding a <context:annotation-config> XML element to your root application context files. In fact you only need to add it to one of the root context files as all the beans are loaded into the same context and looking for autowired annotations only happens once all the beans are loaded into the context.<br />
<br />
Or you could do all of the above but then you might be creating new problems for yourself... ;-)</context:annotation-config></context:component-scan></property>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0tag:blogger.com,1999:blog-11593374.post-88701536538280509472010-10-05T21:52:00.001+01:002010-10-08T22:05:11.648+01:00Spring Autowiring & Component Scanning Problems - Part 5: The CausePart 4 can be found <a href="http://blog.andrewbeacock.com/2010/09/spring-autowiring-component-scanning_30.html">here</a><br />
<br />
It's not clearly stated in the Spring documentation but the auto-wiring stage for <a href="http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-servlet">DispatcherServlets</a> only scan through the beans within it's specific application context searching for <a href="http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-autowired-annotation">autowiring annotations</a> (@Autowired, @Qualifier, etc.), it does not venture into the root application context to wire those beans.<br />
<br />
It sometimes appears that it does cross that root context boundary if you have root bean classes annotated with one of the <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/stereotype/Component.html">@Component</a> family and you enable your web application's component scanning to include that package. What happens is that the bean is loaded into the root application context and then an overwritten version is loaded into the <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/WebApplicationContext.html">WebApplicationContext</a>. This overlaid version is then auto-wired as it lives inside the <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/WebApplicationContext.html">WebApplicationContext</a>.<br />
<br />
Part 6 can be found <a href="http://blog.andrewbeacock.com/2010/10/spring-autowiring-component-scanning_08.html">here</a>Andrew Beacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.com0