Okay, traders, welcome to today's live analysis session with me, Patrick Munnally. Before we get started, I just want to run a quick test on the audio and if you can see my screen and you can hear me loud and clear, if you could type a Y in the chat box, that's okay. So let's, before we start today's chart review and I've got about 20 plus charts to run through today. Most importantly, with respect to today's presentation, the views expressed here are solely mine. They are not representative or indicative of views held by Tick Mill UK Limited or Tick Mill Europe Limited. So now I've got the disclaimer out of the way before I jump into the charts for those who are here for the first time and I can see a bunch of you are. Just a brief introduction to myself. After I graduated from university, I joined a city PLC consulting firm. After a couple of years of learning the ropes, I left with some colleagues and went on to co-found and successfully exit a consulting startup post a merger in late 2004. I then moved on to explore my passion for markets with some capital to play with and some time in my hands. I started day trading or probably more appropriately day gambling, the S&P. And after some beginners luck, I racked up some solid gains. And however, as is often the case, that beginner's luck ran out. That's the market phase changed. I basically began to average down into what were going to prove to be some significant losing positions. I basically gave back all the gains I've made and ultimately took a six figure hit on my personal capital. Say this was a gut wrenching and sobering experiences and understatements to really stand back and figure out if it was feasible for me to make a living from the market. So I decided to get serious about trading and sought out a mentor who demonstrated excellence in trading and had an excellent trading track record. I worked with my mentor for about 18 months to two years. And it was a period during which I up to not just my technical game, researching and developing a trading strategy that suited my personality. I extensively back and forward tested the strategy and developed a rigorous risk management approach to underpin the strategy. But most importantly during this period of mentorship I significantly developed my mental game and probably the most important watershed moment for me was making the shift from being a highly goal orientated individual focused on financial gains to really becoming a purely process orientated individual. And so what does that actually mean? Well, it means I had to stop focusing on what I could make from the markets and start focusing solely on managing my mindset to allow me to consistently execute my trading strategy oftentimes in the face of negative feedback from the markets in the form of losing trades. But once you make that shift and you become a process orientated professional trader and have that professional trading mindset you really then understand the true nature of trading in being a numbers game in which you're simply playing the probabilities and what that helps with is you lose the emotional attachment and investments and that hellish emotional rollercoaster of living and dying by the outcome of individual trades. So I'm no longer concerned with the outcome of individual trades or even a string of trades. My focus is on the next hundred trades because I know if I focus on excellence and execution my edge will demonstrate itself over an extended series of outcomes. My multi-strategy approach has delivered annual positive return since I went back into the markets in 2008. Since 2013, I've also been managing investor capital through a managed account service delivering annual positive returns. The data you can see the trading data on your screen at the moment is the data of that managed account service. I'm currently responsible for managing multi-million dollar portfolio. Since 2010, I've also personally mentored over a hundred private traders of all experienced levels from complete novices to former CME floor traders in developing the technical and mental skills to reap consistent returns from the markets. I've consulted numerous brokers and trading education brands contributing written content, webinars, live presentations on a range of topics for market analysis, trading strategy development and execution. In addition to my fund management and private mentoring, I'm also a resident market expert for Tick Milk providing daily market analysis, a daily outlook for the markets and a chart of the day, basically a setup or a technical pattern that I'm tracking in the markets looking for a trading opportunity. My other, I guess, passion project is as head of trading and trader education for a leading trading education brand called FXqueerswap.com. We don't just offer trading education and development, we also provide funding to retail trading talents. The FXqueerswap, it's not just about developing trading market and trading strategy knowledge, it's also working on mindset developments. And through our structure program, like I say, you can actually ultimately end up managing the firm's capital at zero personal financial risk on a profit share basis. And for those who are interested in learning more about FXqueerswap, I suggest that you either give the team in London a call there, you've got the number or drop them an email and one of the guys on the desk in London will come back to you pretty quickly and you can learn more about what it is where we're doing at FXqueerswap. Like I say, that's a brief introduction to who I am and where I'm coming from. Now, to jump into the charts, we've got about 20 plus to take a walk through at the moment. If you do have any questions and or if you've got a question about any of the patterns or the structure I'm identifying in the charts or you want me to look at an additional chart that I'm not going to cover today, I will open the session up for a brief Q&A at the end. So if you can just hold off on the questions until the end and like I say, we'll run a brief Q&A. So I'm gonna start with the dollar index. All the charts I'm looking at today are an intraday timeframe and I've referenced that as a four hour chart. And what we're gonna look at is the current structure within these charts and see if we can identify some areas that we could potentially trade from or look to get involved in the market. So starting with the dollar index, we're in a five wave decline at the moment. We appear to have completed a wave three low here at this 89.17 and we're in a corrective pattern that's developing at the moment. Now, we had a high put in earlier this week at the 90.70 level and we got the initial pullback into the lows at 89.92. And what I'm looking for is basically a three wave corrective pattern to develop in the dollar index. So ideally what I'd like to see is price make a three wave corrective move into test the demand basically below the 90 level. So if this pattern plays out, what I'd be looking for is bullish reversal patterns on the four hour chart, four hour timeframe, set long positions. And then what I'm ultimately looking for is an equality objective to develop. So equal legs versus the initial move off the lows from below the 89 area taking us up into what I think will be a wave four high in around 91.25. For those who are interested in elite wave, I'm not gonna get into the weeds here about elite wave today and on the remainder of the charts, I'm simply looking at the patterns. But I think in terms of the dollar index, obviously it's a defining chart certainly within the foreign exchange market as it drives the majority of foreign exchange trade. It's worth understanding where we are in terms of the structure and getting a little bit more detailed because that obviously feeds in then to your views in terms of the other FX majors and pairs, et cetera. So looking for ultimately in this move, looking for a test of 91.25. We've also got, if we look at the wave one structure, sorry, wave two structure, we can see that an equality objective there will put us up into that 90, 99 area. So I'm looking for a test of 90 to 90, sorry, 91 to 91.25, watching for bearish reverse patterns in this area to ultimately set short positions looking for a wave five to complete below the current lows, potentially down to the 88, 87, 50 area I discussed last week on the weekly charts, the significance of that level. If for whatever reason the dollar takes off here and we don't get a check back into this 89.90, well then equally what I'm looking for will be the equal X versus this current low, which again would put us up into that 91, above the 91 level in the wave four objective that I'm looking at. So for now, two areas of interest for me on this chart, one is just below the 90 level and one is above 91. And then obviously we have the, how that feeds in then the dollar view into the euro dollar, euro dollars just taking out the overnight lows. I was looking at a game similar to the dollar play looking for a correction higher here before we had lower, but it looks like we're potentially rolling over once the four hour close below the support here at 21.35, then that would actually set up equal legs down into the 120 area, which is ultimately where I'm looking for this correction and in the euro and obviously in the dollar index to complete because I'm still bullish the euro and structurally bearish the dollar, certainly as we hold 120 as support, I see the potential for us to test 124 and even up into 128. Now, if we take out the 120 level, then certainly we'd be thinking lower back down into the 119 will be the next downside objective. But for now, my view is that this move currently is corrective and we should hold 120 as support. So again, in terms of what I've been doing from a trading perspective, I did have short positions running in the euro that I took profits on. I'd be watching how we trade as we test into this 120.70 but predicted weekly range support and we've got prior way forward low here 120.59 which would bullish reversal patterns there. Certainly we could expect at least a three way corrected move from that low and potentially we could be looking at the start of a new wave higher in terms of the euro. So watching for a four hour close, if we take out the lows here at 120.130, I think we head down to 120.50, 120.70 as the next area target to the downside. Sterling, looking for Sterling to complete a corrective move in three way pattern here to retest the descending trend line resistance which we took out earlier this week. So I'm looking for a pullback into 135.60 area. Potentially we break a bit lower to test the ascending trend line here of third test in and around that 135.30. So 135.60, 135.30 I think is where I'd be looking on the long side again. I'm currently short Sterling dollar. Just got into that position but I currently see this move as corrective and I'm still looking for a test up into that 138 area in terms of Sterling. Dolly again, again, we have an impulsive move off the lows here. We took out some key swing points on this move and you can clearly see a five wave structure here without me having to label it. We've got one, two, three, four and this is our fifth wave. So what we're anticipating and what we would reasonably expect from this move would again be that three wave pullback and I'd be looking for something down into this 103.40, 103.30 area. Then I'd be looking for bullish reversal patterns in terms of the dolly end. Set long position to play for what I think will be a pivotal test of the 104.60 area. You can see we're in this trend channel that's pretty clearly defined. From this 104.50, I would be looking for lower prices. I ultimately think we get a test of 101.20 to the downside in terms of the dolly end but for now we're in a correction as obviously correlated with the view in terms of the dollar index. Aussie dollar, looking for a corrective move here in terms of the Aussie. Certainly I think we're going to get a test of the ascending trend line support 76.85. That will be an area of interest if we get bullish reversal patterns there then that could pretend the end of this correction and we could see the next leg higher. I'm ultimately looking, medium term objective is for a test of the AC level. So we'll have to see how price responds on a move to test this ascending trend line. If we don't hold this area of support then again, what I'm looking for is an equal leg to the downside. So if we take out the trend channel support then I'll be looking for us to test 76.25 to the downside these prior highs here, prior low. So I'm looking for this area to act as support for the next leg higher in terms of the Aussie to get a test up into this AC area. Kiwi, short the Kiwi at the moment and I'm still holding the position. I did look as of last night's price action certainly with this trend line being held here a couple of four hour reversal patterns. Haven't seen any real follow through as such and if we can't get any follow through to the upside then I think we can look again. I'll be looking for equal legs in terms of the Kiwi to complete a corrected move. So versus the current swing high and swing low we can reasonably expect a test of the 70, 76 area. So if this move to the downside gathers some momentum here then that's gonna be my target for my short positions and I'll be watching then for this correction to potentially complete here into this support area these prior highs, bullish reversal patterns set long positions because I think ultimately we've got higher to go in terms of the Kiwi certainly I think we can expect to test at the 74 level for potentially seeing a more meaningful correction. So holding that Kiwi position risk at the moment from just above the 72 level, 70 to 20 area is where I'm short. Looney, so we have a potential corrective pattern here completing on the test here back into the weekly range support at the 26, 70 area would certainly consider long positions here but what I really want to see is a move back through the daily and the weekly pivot at 127 to get interested in this on the long side. And again, what I mean, the target for this trade if it sets up is going to be equal legs versus the current swing low. So we can reasonably expect to move to test 128, 70 from this 126, 127 area. Again, once the reversal and trade through those that pivot complements there to get interested in this one on the upside. Swissy was looking for us to get an equal leg pattern down here to test the support into this 88, 50 area. Now we may hold here at these prior highs. You can see in terms of mirroring the prior price action we've got two tests of this 89, 20 area and eventually rolled over. What I'd be looking for here is for that to if we do hold 89, 20 for another leg lower for this correction to complete. And like I say, I'd be very interested to see how the market responds on a test of 88, 30 potential inverse head and shoulder scenario. And certainly I'll be looking on the long side then to get a test of the major descending trend line up towards that 90 level. Now, if we get a close through 89, 20 then the target becomes equal legs straight away on that close through the 89, 20 for a test of the descending trend line. So again, using that same structure we have, there we go, so versus this swing low if we hold 88, 50 as support and we take out these prior highs on a closing basis then we can expect we're on route to make a test of this 90, 20 area. And then from there, watching for various reversal patterns and certainly we could reasonably expect a retest of the 89, 20 as potential support or this would act as our way for high and we trade lower to retest and ultimately break lows. Obviously brought in line with my dollar view of making new lows a fifth wave low for the dollar index. So we'll see how if we can get the close through this area if we don't get the close, then what I'm anticipating is an equal leg pullback which will put us back into this area and watching for bullish reversal patterns that long positions for that 90 objective. Stelling yen, had a couple of questions on this last week. So I thought I'd take a look at the charts and what I'm looking for here we've got a potential double top but some nice divergence in terms of momentum studies and if we can take out the 4150 I actually posted this as a chart of the day today can get into this on the four hour timeframe here now 41 actually 4170 you get a probably better at a risk reward in terms of the entry here got a nice pinball reversal inside bearish reversal. So if we can take out the daily pivot at 141.80 then I think there is scope certainly to test the ascending trend line 141.20 and then we'll see if the pullbacks don't find new highs then again we can expect an equal leg lower ultimately looking for a test into this 140.60 area before again thinking about Stelling yen on the long side we've got an equality objective above us as I discussed last week we can be trading up towards 151 in terms of Stelling yen later this year. So I'm still still bullish Stelling yen but certainly we can play the correction here. Euro yen now Euro yen is getting interesting we're breaking this trend line we've been sitting on this we're getting a break what I look for now will be a retest of support here we've got the monthly pivot 125.90 we've got predicted daily range support to 126. So what I look for is potential support to develop in this area and then get a retest of this trend line from below and then that would set up an equality objective to the downside ultimately I'd look for us to retest this 125 area prior range highs here that to act as support and that will be an opportunity then to get in on the long side for higher prices in terms of in terms of the Euro yen and just basic wave formation here you can see we have a one, two, this will be three, four and then we'll have a five up here. So for the elite wave fans amongst us. So yeah, this chart is starting to look interesting and certainly want to see how we trade when we test this 125.90 area like I say pullbacks back into this trend line from below bearish reversal patterns will be an opportunity to do something on the short side target 125. The Aussie yen, a bunch of these ends have well a bunch of these risk correlated FX pairs have some pretty interesting trend patterns developing I won't talk about the indexes shortly but for the Aussie yen, if we can take out these highs I'm ultimately looking for a test up into this 82 area for a potential three wave pullback. Now, if we stall out here and we double top in terms of the Aussie yen well then what I would be looking for then would be this scenario. So trade up into a double top then we get a move down into this trend line support watching them for those four hour reversal patterns that long positions targeting this move up into the 82 area. So pay close attention to the this trend line. I think it's an area certainly of interest where we could be looking at setting long positions and equally in terms of having additional trading opportunities a double top here in terms of the Aussie yen with bearish reversal patterns from the daily range resistance prior highs and this momentum divergence gives us an opportunity to get it or to relatively low risks scenario to test the idea of this downside test of the trend channel or the trend line sorry, based on the momentum divergence. The only for me in terms of trading and as part of my trading strategies many times I'm interested really in trading counter trend is where we get really strong divergent patterns because those often precede the corrective moves. So watching two opportunities here prior highs 80 80 looking for bearish reversal patterns short down into the trend line 79 60 and then from there see if we can reengage on the long side and ultimately looking for a test of the 82 level. Euro Aussie in watching this wedge pattern here in the Euro Aussie as we potentially test down into the daily S3 the third test of the descending wedge bullish reversal patterns could give us an opportunity to trade this counter trend again only interested in counter trend if we have this really nice and clear divergence which we do have. I think we can see a three wave corrective move get us back up into this 159 area before ultimately heading lower in terms of the Euro Aussie you can see we're in a pretty strong downtrend here and I don't see at this juncture any reason to fight that trend as such. So I mean, this is a counter trend side if you in terms of thinking position sizes and risk reward maybe you want to slightly reduce your position size because the bigger the better opportunity is realigning with the trends post-correction for what I think will be new lows in the Euro Aussie. Euro sterling also got a nice wedge developing here so if we can get a test down into this support zone let's change that. So what I've been looking for here is a test of this prior support down to 8860 I think we get a three wave corrective move from there but again in terms of the trend I think we're heading lower in terms of the Euro sterling we've got a daily trend line or weekly trend line even coming in I think down towards the 84 level so any three wave corrections would be selling opportunities and certainly if we've got to move back into this 90 area this pivot zone watch for various reversal patterns short looking for new lows. Last of the FX pairs here sterling Kiwi had a question on this last night so I think three wave corrective move here what I've tracked for us is what I believe is going to be a ultimately a corrective swing here so what I think we're looking at is this is the bigger ABC objective so 9250 and I think we correct versus this current move into a little inverse head and shoulder scenario I get a pot then up into the 9250 certainly from here I'm paying attention for those bearish reversal patterns to set short positions looking for new lows ultimately in terms of the sterling Kiwi and at this stage unless we trade through the 93 level I remain bearish and looking for new lows in terms of the sterling Kiwi all right let's take a look at some of the indexes S&P 500 consolidating this afternoon we have Biden president let Biden is going to discuss his two trillion dollar stimulus package and that's likely to to see the money well I mean we could be on a buy the rumor sell the fact type setup where the markets cheer the announcement and then we get some buyers remorse and a correction I'm certainly bullish bullish these equity markets I don't I don't see us rolling over in the near term certainly versus the couple of key swing points here this 3680 we've got trend channel support coming in 3700 so any pop up into this resistance zone 3860 with bearish reversal patterns with the divergence that we've got in terms of momentum does offer a shorting opportunity but again the shorting opportunity whilst countertrend looking for that three-way corrected pattern because I see support sitting at 3700 and from there I think we can that we can make new highs similar scenario in terms of the Dow looking for a test of 31 31455 as a selling opportunity again note the divergence we've got here on the momentum studies so bearish reversal patterns from here and I think we get a move back in to retest these prior highs at the 30 30 3400 area again just corrected at this stage I think we're going I think we'll be heading meaningfully higher as long as we hold this support zone the DAX looking for a three-way correction in terms of the DAX to hold and test 13758 from there I think we can make new highs looking for 14400 up to 14500 before we see a more meaningful correction you can see really nice leading diagonal here which is which ultimately should portend a corrected phase and we'll see if we can get the pullback what's bullish reversal patterns here long positions targeting new highs and Nikkei 225 coming into its resistance zone and again note that's a really nice bearish divergence we're getting so looking to fade new highs here for a three-wave corrected move to ultimately target but hold these ascending trend line support into the 27900 area and again from there look for new highs up towards 29600 29600 in terms of the Nikkei so from there then we could see a more meaningful correction as we complete the ending diagonal pattern could see similar story we've got really nice defined trend channel trend line here and again it's looking like a an ending diagonal pattern but three-way any any move back into test this ascending trend line support in the 6663 area watch for bullish reversal patterns long positions targeting new highs and then from that third test of this projected ascending trend line resistance obviously accompanied with the bearish momentum divergence will offer an opportunity to play for a more meaningful correction I think in terms of footsie and certainly we can get a retest of the yearly pivot back down to 6500 would be the objective before looking to find footing and make get more constructive gold so again looking for that three-wave corrected move I ultimately I'd like to see gold test back down into this 1770 area and from there and certainly get constructive I think then we can you can build a really nice base and see see higher prices in gold if we can get a three-wave move that terminates get bearish reversal patterns in and around this 1880 area I think that's a shorting opportunity to play for that 1770 test and then we'll see how our prices respond down there in terms of getting getting more constructive on the on the upside silver similar story to gold we've got a pretty nice pretty nice trading range that we're in so any any rejection from the just about the $26 level I think we then get the move down to test 22 a support and that third test if the buyer step back in there then I think that's the base for much much higher prices in terms of silver certainly we're going to look at 29 and higher range resistance there so watch watch for failure above 26 for short positions targeting 22 and then see if the buyer step back in here and then I think we've got a great great upside target up towards 29 crude oil looking for a three-wave pullback here to ultimately test and hold the 51 level I'm looking for 55 as to complete this initial cycle or sorry this current interim cycle I think then we can see a pullback but again we've got a really nice projected trend line support which comes in just below $50 it's prior to highs here and I look for that to hold and again then I get more constructive in terms of crude looking for looking for a move up I see us potentially test testing $60 whilst we hold 50 as supports and last but not least everybody's favourite bitcoin had the pullback and my swing strategy for I share with the guys that's on the trading floor FX career swap got a buy signal last night in terms of bitcoin however if we if we can't get back through the 40 000 level I see the potential for us to correct again and ultimately test and hold a third test of this trend line here 32 35 32,350 watch there for bullish reversal patterns at long positions my interim target for bitcoin is is up here towards 44 500 and then we'll see how the market responds there if we we sail through there then and we've got much higher prices to focus on but the interim objective for me is going to be this 44 500 versus this potential corrective pattern now we could have completed this if we take out take out the prior highs then immediately my focus will come to this 44 500 area as a potential profit taking I back in October the first technical review I did of bitcoin provided a buy signal on the day that's that I did the review and you can check back I think it was October the 8th was the buy signal for bitcoin and I've been holding long positions since then which are proving pretty profitable okay so that completes my chart pack for today are there any questions you can either type your questions in the chat box or type a pair if you want me to take a look at a pair that I haven't covered or I believe you can also I can unmute your mic if you want to speak to me directly uh dollar yuan let's let's get this up okay so again I at first I posted um back in the beginning of the year um a bullish thesis for the dollar dollar yuan where we're sitting at that major weekly um trend line support and buyers have stepped in so now what I've been looking for here is uh is a test of the 6.5 level ultimately I think we can test up to 6.7 um and for those who uh who followed my my work um there was a big buyer at the back end of last year of um of options in and around this 6.5 6 sorry 6.7 level um so we'll see if we trade up there I think they I think they came they come into maturity in the first three months of this year I'll check back and and I'll give you some some feedback on that but uh yeah I think we can trade higher in terms of dollar yuan and certainly whilst we hold this weekly trend line support if you check on the tick mill blog you'll see uh it was the first chart chart of the day for this year where I talk about uh dollar yuan uh constructive versus these lows um is my uh is my read at the moment uh sterling ozzy let's try again sterling ozzy so sterling ozzy um again it's it's really it's a similar scenario to um to the sterling kiwi what I've been looking for here is whilst we hold the pivot and I think we could potentially see uh move up to test into um into this trend line resistance um it's sure I'm complete there we go so I think we can get a move up to test this trend line resistance but again I would be I would be bearish versus uh whilst we hold this trend line resistance I think ultimately we're going to see lower prices in terms of the sterling ozzy so we'll be looking at uh you know there's this being a correction however I mean if we can't hold support here at the 175 53 area then I think we we're headed back down into the lows and a retest of the 74 28 um so we'll see how price basically it's going to be whether or not we can hold uh hold this weekly pivot to to get a test and sending trend line resistance I think pretty profitable isn't it uh what's your take on weekly GDP um so yeah I mean I've um um sterling dollar I think we whilst whilst we hold support 135 40s I think we can get a test above um 138 from there in broadly in line with with the view basically a bunch of these risk assets I think then we could see a corrected move and more sustained correction but ultimately this year I mean whilst we hold this trend line support currently coming in now 133 50 let's say my target my interim target for um sterling is is a test of 140 and I did cover Charlie last week you'll um if you check the recording from last week it's on the technical blog um under my profile uh you'll see my my sterling dollar view uh on the weekly 140 147 uh possible uh USD Ghana right that's one I haven't uh let's have a look USD GHS right let's take a look at this I mean this is a uh an interesting and very a liquid chart let's go to the weekly so I mean you can clearly see here that there's your trend line support there's the trend channel basically for um for the steady so again put so the the play here would be pullbacks into um 5.5383 uh to be bought and and ultimately to trade higher so I mean you only really uh get concerned on the downsides uh on a closing basis versus this trend trend line support and this is a trend line that's been in place since uh 2012 and you can see every time we've dipped here uh there's been significant uh bids come into the market so um yeah supports comes in uh at the trend channel and I would just speak you can see the price action how uh takes it out pulls back retest takes it out pulls back retest takes it out pulls back retest so yeah I mean higher prices versus this trend line support so that makes sense Harriet you just see what the bid asks on that that's pretty uh good time okay so any um any other questions if there aren't any other questions an n in the chat box is helpful then I'll know we're all we're all done and dusted and I can wrap this session up here and we will uh reconvene same time next week thanks very much hope this helps


It's almost looking like a Windows computer for a while there. Can you see it? Do we need to bring the lights? It's really clear. Yeah. Ooh. I have, see, I should disable that. Flux. That looks a lot better. A lot more white. So, as I said, I'm Bjorn, and I'm going to time y'all and see how long it takes before you fall asleep, because this is probably going to be a bit boring if you are web developers, but sometimes we have to deal with things that aren't on the web, and sadly not in Ruby. So Bjorn, web developer, DevOps, and Pythonista. So come on to the Python meetup. We're very friendly, nice bunch of people. And the big question I would like to ask is, in general, they're like, what do you guys think about your code bases? You feel good? Yes. You feel it? Awesome. That's a real self-assured people. I'm really happy to hear. Like, do you test them out? Yes. Of course. Oh. That's good. What kind of tests? Unit tests? Honestly, tests. Oh, yeah, I've had those problems. I'm just going to append this temporarily. That's not going to be a problem, right? Yeah. Thank you. Annual testing, all that good stuff. Integration testing. Want to make sure your web browser keeps going, rolling where it goes. JavaScript error doesn't stop. It doesn't hit the client, hopefully. Infrastructure testing. You guys do that? How do you check your infrastructure? That stuff is actually going. KSMonkey, we also have the end-users testing it, which works if you're a startup. And for some organizations, it's not entirely good. One of the other ways you usually do is, you have something like Ansible or Chef, for-puppet running and use-side. This is what an environment is supposed to look like. Running some integration on top of that, and you can test out what you're doing. So this is kind of where we come into what we are doing. So I am currently working on a fairly big project with Neon ThoughtWorks, who probably would love it at a point like that. They are also hiring. And because of the nature of the project, we do a lot of file transfers. Well, not a lot, but we do a bunch. It's from legacy systems, systems connected to some mean frame somewhere that we can't touch. It has to be file transfers. They're SFDP, they're encrypted, packaged, making sure the network connection stays up and all that. And all of this integration is handled by a bunch of different teams, and we're just trying to, you know, set spider in the middle, do our thing. And we don't run the servers where our scripts need to run. And because of this, we ended up in a position where we have to run bash. And the only thing we had a lot to run is find, grep, set, and all of these fun things. Which, you know, I've used those before. I've written my 10 line bash script to filter something out. It's great. When I had to do production stuff, though, I was looking at it like, oh, this is Red Hat servers. This is good. I know Red Hat. Red Hat got Python, which I also like. It has Pearl. Please let me use anything. And they go, nope. I was like, please, Pearl, anything! You got the nose tricking me, though. So, yeah. So what to do at that point. Looking at bash, it has aged. It has been around for a while, but, yeah, I've seen prettier things. I spend most of my days coding in Ruby, so I definitely did. But we wanted to do some kind of TDD. And what are the options we have available if we want to do TDD with bash? And so we found this thing called Sharnes, which is a portable shell library, to run an Allah's automated test for Unix programs. It was originally built to help test out Git. So, obviously, it has a good program. It's testing out and making sure it actually works. But what does it look like? Doesn't it look nice? Oh, yeah. If you look at that, that's basically saying, this string eval that and tell me if it went green or not. I've seen that before. That's Angular. I don't want to do Angular in my code. I don't want to do it in the browser either, but... No. Okay, so, we figured out we're not touching that. We're staying away. There are plenty of other frameworks, but they end up in the end coming out of the same thing. So, what do we do? Well, we know... One thing we do know about our program is that we know that there's going to be an initial state. We know what that is. Then, we know that we're going to fetch that and we're going to get it to a specific state. All of these things. And this reminds me of something. Integration testing. So, what do we know? What do we use for integration testing if we're Ruby developers? Also can. Yes, thank you, Winston. Now we went white. So, Cucumber is great. How many have actually used Cucumber in here? That's a good number. Could be more. So, the good thing with Cucumber is that you can write your stuff in so-called business language. You can read out a story.  It's just black box. You don't have to care wherever it's being run. Even if it's a shell script running on a remote Linux server somewhere. It also helped us to actually be able to do a red-green refactor on our bash scripts. So, it's pretty neat. To be able to do all of this, though, we had to use a really weird tool chain. So, I hope people know of the GNU. This is the GNU Organizations logo. Anyone know what the GNU stands for? Yes, GNU is not UNIX. They're recursive acronym. UNIX hackers. So, they like the recursive stuff. So, another thing they like is something called M4. M4 is a recursive macro language.  So, they like the recursive stuff.  M4 is the reason for that. That's why people say that. Just warning. Use postfix. Make files. Because who doesn't need make files? That's good stuff. GNU Core Utils, which is things like find and date and all of these things. Bash, of course. And then, cucumber and some SSH. Because we'll do that later. Some small stats about what we did. So, because of this project because it's so big and has so many files, we needed to figure out a way of actually combining our files so we could write a smaller script and then just compile the big one like, you know, requires. So, we use M4 for dealing with our requires. That's why that is in there and it's placingly fast. So, we have something like 616 lines of shared libraries yeah it's it's grown today 2000 ish plus lines of scripts played over 40 of them all tested luckily the biggest pipeline we got has 15 scripts on them running across three data centers and nine servers lots of fun total of 15 and a half thousand 16 and a half thousand lines when we compile them all together I don't quite understand how those numbers make up but I'm trusting DC so and the largest largest script when it compiled is 700 lines where 142 when it's not compiled so that's like the meat of the script just taking all the library parts and getting it together so I mean 142 lines of batch script this it is a couple of screens but it's not too bad you can actually look at it and you can make sense of it but still and our cucumber scenarios there's something like two to have 2,400 lines 300 scenarios and two and a half 2,000 steps takes a little bit less than 10 minutes to run which isn't too bad and if you want to write bash like this how do you make sure that he actually is something that will survive you because right now I've done a lot of this I know pretty well how it works and I feel a little bit sorry for the guy that's gonna take it over after me someday I've been doing what I can to make sure they don't have to hate me but you know you want to make sure you should stay away from that and the reason for this is because there's so few people it's actually done bash on the size where it you start to have to think about making sure it actually looks good and you can compile together and deal with it it because 10 lines that's what you do so try to keep it make it lean clean all of that stuff use functions name your things try to avoid the bash shortcuts they're like you can there's a lot of places inside a bash where you can do some really nice short version of things and then there's a long version an actual spelled out name it's like pearl magic variables stay away from that especially we want to make sure people can use it afterwards so simply try to keep it beautiful and because beautiful is better than ugly explicit is better than implicit simple is better than complex complex is better than complicated the center python so if you have python a computer just open it up and type import space this it is wonderful and so I shall script like this what can it possibly look like so this is one of our basic work courses it's just downloads the files from one server it checks if there was anything downloaded add some checksums because it's the first time it's coming in I want to make sure the file that I receive now is the same file I receive one at the end of the pipeline and pushes it on it doesn't clean up doesn't look too bad right come on it's not too bad I mean the syntax isn't overly clear at all the time like the if error the dollar percentage and what the dollar question mark and so on like it's not too but same time you could follow this along if you if you were looking at it so just give an example of what all of it is so this if error it is a function it's just a normal function call function we made ourselves so the affairs the function this is an exit status of the previous command that you ran this is the error code that I want to return in case there was an error and this is the message I like about it and all of this just tells me whenever I get the log mailed to me from whoever was running it that this is where it went wrong and I can actually figure out and go and see what happened and read the log and see okay we changed the permissions in that folder again please stop doing that and when it comes to these error things this complete side note do you guys know what the success status code is on a unit system why is that yes nothing went wrong no errors which it is one of these things I've noticed that a lot of people haven't actually gotten around just keep around keep it's good thing I know cucumber so this is an example of a cucumber file or gherkin it's called and it's business e-language and given given when then and so on these write down all the steps that you would like your thing to take and well this one is very wordy because I have a lot of paths in it because it's the only way I can actually test my thing it's also fairly readable it's not our speaking but give it a try and when you're doing this thing just test it where you deploy not in production I know that's the cool thing to do unless your customers test it out not always an option but if it can't go for it if you're deploying on Linux God say test it out on Linux before you do anything because you know that your max if you're like me and I use one of those I actually use BST tool chains for a lot of options like your grep on your Mac is different from your grep on your Linux box your set is different and they're not to speak about what happens when you have to run the Solaris God vagrant if you have heard of that which is a virtual it's a it's a way of bringing up a virtual machine from scratch on your computer and getting the same environment up usually together with something like Ansible or Chef or Puppet and being able to get the same thing over and over again obviously is a great for these scenarios that I got I have something like 16 user accounts 250 folders special setup for SSH and a bunch of other stuff because I need to make sure the environment looks like it does for my clients and that's horrible and it runs in about 10 minutes so from doing all of this nasty work what did I learn well I can now feel fairly confident that I can change even the Nautilus little bash script I got and then I can see that it works will run through my pipelines and I won't have to feel too worried and that's a good thing I like sleeping at your bash code will be more readable if it's less idiomatic because all of these double ampersands you see everywhere by a very succinct unless you actually know what's going on the people just freeze up the same goes if you're doing the double ampersand and double pipes which is the and or or rather if and else which no just don't stay away set minus x is an option you can have in your bash script and they will print out every single subsequent command that bash runs for you so if you do echo it but it will print out plus echo and then you will see the response of your echo they will do that for everything that you do it makes it super easy to actually debug your thing when you send it over to be run on the servers and it will save your ass if you enable it I'm pretty sure you also have to log to another file that you can get a succinct message in case there's some other error but be able to get it full is great set minus you you get whenever you try to sign to a variable and just spell out args instead of args it will just blow up instead of noticing that way too late always good but I'm also Python guys so I like it when things explode set minus e x is an error so Python thing is that if you have a dictionary in Python you try to call something that doesn't exit we just blow up because the assumption is that you will catch exceptions you get nils both are good ex good way of dealing with things but different set minus e we'll make it so the script will blow up if anything goes wrong anything including an if statement doesn't help a lot it looks like a good idea but trust me you're staying away default past default variables are great they're super confusing to use because what the hell just look at that syntax but really useful especially if you need to be running through some weird environment you must not override one thing on that particular server having different configuration files to your scripts are great because then you can just tack it along at the end of the script so you can test it and rerun and you can test multiples and areas you don't have to modify your script so really useful plus you can similar and go out your scripts together when they're the same across multiple things a lot of us don't know that much about the unix that lies at the bottom of pretty much all that we do all day or where we deploy so I really suggest looking to new core utils look what your shell can do because you can probably learn a lot and really worth it and surprisingly I had fun at this like I've had my fair share with my fist meeting my table but I also had fun any questions or comments how much does set that's not a concern of mine the my things the things we're doing is slow anyway because we're doing encryption and decryption and packaging and networking and so I wouldn't know no we already had a vagrant set up at work and I know how to use it so I didn't want to tackle that issue exactly that's wrong so when somebody's using it I always like to ask them so what is your experience of it not just in that what you're doing there but also specific also with rails specifically how do you use it where do you find those benefits so the looking at the project at work we use it a lot for the browser automation set part of it up that's that's one big part of it I also like it for the integration stuff because I just need something where I can explain I want this to happen and it's something happens which is a black box which we don't care about what it is because we defined it somewhere and then I can look at the results and it also has the advantage to me that even the people that are like the ace or probably managed to look at the thing and again idea what's going on because they get bonus they get brownie points with the client when they can show that and say this is this is the good thing this is the thing you're paying us for that's my point of view I would like to point out so I think that has values when I started out with cucumber I I replicated my exact unit test in our spec in cucumber and it's like what am I doing this this is a waste of time yeah like you live and you learn plus working with the team with people has been doing this for years really really lets you see how effective it can be used correctly yeah and it's also the fact like the work that I'm working on is split into multiple parts and we receive messages from like we don't only have file integrations and having something that can actually ping one side of the app and see that it travels through to the other side of the app and all the transformations to happen on the way has gone through I mean you can do that to an extent with unit testing but that I mean if you start having that through the entire chain something's wrong with the unit test because they're going to be dog slow so you test test the individual part but something I see that comes together you can do that with other tools as well obviously but it's a good one I find yep so we're not done yet the first scripts took about a month and I spent I think we spent about six man weeks on it like on the pair three weeks roughly for the first set then it's been continuous continuous additions to that from that onwards but I think as somewhere around 8 to 10 man weeks in total doing all of this we have a lot of logic in there like that's all I can say there's there's a lot of stuff that I would rather not do there it would have taken me a lot less time I don't think the lines of code would have changed but it would faster because arcane syntax and invocations is fun I have the beard and everything but no thank you that's it yeah if I was good at it yeah I would definitely do it like the only question would be if I would be allowed to run it but if I if I was a possibility yeah it would be really neat I would also be fast but I must admit one of the things I really love with with the bash grips as far as just the fact that I can see every single step that it takes easily and if I wanted to add something like that to my Ruby scripts or my Python scripts or anything I would have to let the bug statements everywhere or run it through a wrapper or something yes that's what he asked if we were thinking of running a compiled program and sending it over no I didn't because I'm honestly not very good at those things so thank you all right can we give a round of applause I couldn't resist I love this thing so up next we have Justin