Could not combine logical operators into an evaluated expression to account for a 3 factor condition with 2 combinations. — chose to write ANOTHER elif statement which made it work but felt it was a loss.
Author Archives: admin
Interview Questions
What about openBSD makes it secure?
This is a question that digs into your knowledge of how openBSD as an organization, functions. If you understand their focus on security, the slowness of their adoption and their public tally of how many times they have been owned remotely, you understand what makes them secure.
Exercise for Engineers: Part 7
Hydration
How many times have you read about someone telling you that you need to drink lots of water when it’s hot? When you’re sick? When you exercise? Blah blah blah! Here is the real skinny on staying hydrated among a myriad of situations and factors.
Water is the solution in which life exists. Every chemical process and exchange in your body takes place because there is water present which allows it to happen. Think of your body as the highway system of a state or country that you live in. Your blood, glucose, oxygen, fats, proteins, digestive fluids, hormone secretions, your kidneys, liver, heart…. EVERYTHING in your body uses this highway system, and it is made entirely of water. The one thing that probably comes to mind the most when you think of hydration is how aware of it you are on those super-hot days of blistering 43 °C ( 110 °F ) heat. On days like these, the sweat comes dripping off your face in buckets.
You need water in your body to keep processes working and traffic on your biological highways flowing smoothly. This becomes especially important to those of us that engage in rigorous, daily exercise and training programs. The levels and nuances of proper hydration can become tricky for some of us as there are a lot of factors that are involved in properly hydrating ourselves. Let’s do a bullet point list to go down the line
• Always drink regular amounts of water throughout the day. 8 glasses is a very healthy amount, but it should vary with your weight and level of exercise. A great way to tell if your hydrated is to check if your urine is clear. If it is a deep yellow, then you are dehydrated. If it ever gets orange in color, you’re in a very bad way. Multivitamins will add their own color and invalidate this test.
• If you have a high protein diet, you may want to drink extra water. Excess protein will finish metabolizing in the kidneys where it is disposed of, and pushing too much protein through the kidneys will destroy them. Many of the initial Atkins Diet enthusiasts found themselves on dialysis after 6 months of the program. Plenty of water will help control the concentration of protein passed through the kidneys.
• Over hydrating is also unhealthy for you. During excess urination, imbalances in your electrolyte levels will occur. As a body builder, having both your hydration and electrolytes at the proper levels is very important. To reduce the likelihood of overhydration, I frequently eat fibre rich fruits and vegetables such as oranges and cucumber ( or pickles!! ) as they act as a form of slow-release water that gives me the best of both worlds.
• Avoid drinking excess fluids during mealtimes. Throwing back three or four glasses of water during dinner is a great way to get hydrated, but bad for your digestion. Overconsumption of water while eating will dilute your stomach acids and digestive enzymes to the point that your food will not fully break down and not be metabolized fully. Its best to consume small amounts throughout the day.
• Minimize your use of coffee and alcohol as both are diuretics. Diuretics actively deplete water from your body which is why coffee increases urination frequency and alcohol gives you hangovers. Drinking a cup of coffee is the same as removing that much water from your body. Alcohol also does this but at double the rate.
• For those of you that use creatine, ( Like me! ) you will have to drink even MORE water to stay ahead of the curve. Modern creatine matricies are specially formulated to trap water around the muscle fibres which give you an increased pump and quicker recovery time through increased catabolic trafficking. Keep that water bottle full and fresh!
Exercise for Engineers: Part 6
Caffeine vs Long Term Fatigue
There is a war underway. This is a constant struggle that we all fight to get enough sleep at night. Is your life so busy that it cuts into your precious shut-eye? Mine is, and I’m sure most of you reading this have dealt with it from time to time. Sleep is by far, the most precious thing in my life. Without it, I am destroyed, worthless, grumpy and I have no energy to sustain myself throughout the day or in my exercise routines. Personally, the issue of sleep can be very daunting. I try to get up at a certain time everyday and I try to go to bed around a certain time as well. This is not the case as much as I would like it. Sometime I work too late or I’m just not ready to go to sleep when the hour arrives. I end getting to sleep many hours later than I would have liked to. What does this mean? Lots of bad things for me during the next day. Then we stress out about the fact that we will be tired while we’re not getting to sleep and it makes it worse…. endless cycle.
Enter stage left caffeinated beverages. Coffee and energy drinks much like the ones you see pictured above are fancy soda marketing’s answer to your lack of energy. If I don’t get enough sleep tonight Ill just slam down one of these pretty colored cans or make the coffee extra strong in the morning and all will be well, right? It’s the caffeine that gives you energy right?
Wrong.
Caffeine is an energy catalyst which functions by stimulating your adrenal glands which then pump your bloodstream full of the super-human, fight-or-flight hormone called adrenaline. This is a system that is normally reserved for situations where a big bad guy is trying to thump on you and you need to pull some quick, fancy kung-fu, get to steppin’ or become worm food. Having such direct access to this vital system in our body which increases strength, speed and reflexes by as much as 400% is a bit of concern to me.
The emergence of popular disregard for our fatigue load is taking its toll on human health. Consuming caffeine on a daily basis allows you to effectively ignore your body’s natural desire to recuperate and get some rest. Do this on a continual basis while not getting enough sleep and you have a recurring disaster on your hands. Long Term Fatigue is what your body accumulates over time while not having enough rest from your day to day activities. Add exercise into this while continuing to not get enough sleep each night and you begin to develop an accumulation of Long Term Fatigue. This is not something you can sleep off in one night either. I have become so tired from long stretches of physical work with high stress and not enough sleep that it has taken me almost a month to start feeling fully rested again.
Want to know how much you have? This is the fun part. When you wake up in the morning are you dreading going to work and all you can think about is calling in sick just so you can sleep in till 11?
You have got some. Try this one too: Go into a bathroom or other darkened room during the middle of the day and leave the light off. There should be plenty of sunlight or brightness outside the room but leave the room dark with the blinds shut or having no windows. This will provide a high-contrast reflection of you in the mirror inside the darkened room. Now take a look at your eyes. You see those dark spots just under them? That is the accumulation of your long term fatigue, measurable by the congested blood capillary traffic that gets stuck in gridlock from your lack of sleep.
The bottom line is that we have become accustomed to not getting enough sleep, and if you have intentions on becoming an athlete in any way, you will need to master the art of daily, restful sleep.I am not telling you to abandon your morning cup of Joe either. Caffeine is an essential part of my exercise routine as it gives me a tremendous boost to my energy output at the gym, but I don’t need it to wake up. The best way to meter it out is to not drink it on the weekends and make sure you listen to your body when it tells you it’s tired.
Cool linux commands (continued)
More fun stuff..
stay tuned for some cool commercials after the content! LOL
file: describes the contents of a file
cat: outputs the content of a file, associated with the stdout.d library.
How do we find how many javascript calls cnn.com makes?
pseudocode:
1: pull javascript calls doc from cnn
1.5 load them into a txt file.
2. parse calls by delineating calls with script
3. count calls with script file
4 you are the man.
cat cnnindex.txt | grep -i “text/javascript” | wc -l
What did we learn here:
wc = word count
piping commands channels output sequentially making things act like batman.
a javascript call looks like this: <script type:”text/javascript”>
again:
Pull the contents of a file down from the net with curl or wget
use the > delimiter to output that command to a file, in this case cnnindex.txt
open the file up and learn something about javascript calls… we know what they look like from the line just above this paragraph.
grep -i with the text that designates the code as a javascript call inside double quotes,
and pipe again, that contents to the word count command which counts the number of instances pulled back from the contents we piped to the grep command.
our output was 20 and we are now the man.
Exercise for Engineers: Part 5
Properly Fueling the Body
I will make a safe assumption and say that most people have no idea what food is made of, how digestion works, when to eat, what to eat, why you should or why you shouldn’t; the dynamics of how the broad spectrum of foods are metabolized and used by the body is a complete mystery to average-Joe-citizen of this planet. Allow me to provide you a little of my athletically-biased clarity.
As one of the most athletically minded people on the planet, all of the eating that I do is timed properly between my trainings and has a specific goal for the type of eating that it is. More specifically, every meal and snack I have is coordinated to have a direct effect in relation to the training I do.
There are three types of eating that you can do as an athlete:
- Fuelling the body to have energy throughout the day or for a workout.
- Providing recovery nutrition for your body to rebuild itself after a workout.
- Sweet-tooth savouring and pleasure eating.
As I eat throughout the day, I have developed a very specific discipline to juggle the first two types of eating back and forth around my workouts. There are a few reasons why eating needs to be timed around your exercise schedule:
1. You must eat a carbohydrate-rich serving of food before you engage in exercise of sustained, moderate intensity. Once you eat the meal, you should wait two hours for the food to be properly metabolized into the sugars and glycogen your muscles will burn during the workout. The best kind of carbs for this are slow burring starches and complex carbohydrates that will sustain you longer during your exertion. ( Potatoes, Oatmeal, Cream of Wheat, Pastas, etc.)
2. After a workout you need to eat a protein rich meal to properly fuel the anabolic muscle rebuilding and growth processes that begin 30 mins after your workout is complete. You should also have a moderate helping of carbohydrates ( of any kind, even cake or pastries are fine) along with it to restore your blood sugar to regular levels after being depleted during exercise.
Note:
Eating protein after a workout is absolutely crucial for attaining the net gain during an anabolic muscle rebuilding period. In simpler terms, your body is in a constant state of adaptation. If you do a 40 minute arm workout, when it’s over, your body will begin rebuilding and strengthening your arms in response to the exercise. Where your body gets the protein to do this is up to you. The first place your arms will look for protein is in your stomach through your digestion. If there is none there to take, they will take it from other muscle groups in your body, cannibalizing muscle tissue from your chest, legs or wherever they deem appropriate.
So make sure to eat protein after a workout.
3. Eating should be done more often and in smaller amounts. Six meals a day or eating every 2 to 2 ½ hours is appropriate. As our ancient ancestors evolved, they were grazers and always enjoyed smaller, more frequent repasts. This habit likely came about from the full time job it was being a caveman trying to feed yourself. Never knowing when your next wild boar or wild berry bush was going to come along made you save some of your food for later. Eating this way is key to winding the gears of your metabolic clock properly. Pleasure eating and satisfying of the sweet tooth should only be done every once in a while. All this type of eating does is slow down the function of your well-oiled machine.
Doing steps 1 and 2 may become simple enough after a few weeks of really keeping your eye on the ball with balancing your eating and timing it with your workouts, but number three will appear to be unrealistic to some. Getting in 3 squares a day is hard enough as you have meetings, a long commute to the office, soccer practice for the kids, running errands, trying to have a life…. and you want me to eat six times a day? Are you nuts?
Quite simply, yes I am.
As the shape of our lives has quickly slipped out of the mould that our bodies have been accustomed to for hundreds of thousands of years, we are not simply at liberty to adjust our own physiology to adapt to a different kind of work-based and highly involved, civilized lifestyle that does not accommodate the frequency and types of consumption that should be integrated for optimal health.
Eating should be geared around what I call, the Metabolic Cycle. In a Metabolic cycle, only a certain amount of food can be used by the body for steps 1 and 2 during a given period. After those systems’ fuel tanks are full, the remainder of what you eat is either stored as fat or processed by the kidneys for disposal. Don’t overeat. Look down at a plate of food that will make you “full” and just eat half.
It is the best that we can do to make small, mindful adjustments to our eating habits and types of foods that we eat to become more aligned with the programming inside us that dictates how we properly fuel the body.
Setting up my home development environment: PainPoints
In as much as being a security consultant is cutting edge, its not cutting edge unless you have had proper exposure to the administrative tasks and coding frustrations of building out and working within an enterprise environment. Im going to be bemoaning all of the painstaking frustrations and things I learn here in my bloggy blog for future reference.
quick points:
-Shift-ZZ is how to save the file you were just editing in VIM and exits to bash.
-If you fail overwriting a file completely in Unix, it will create a swap file that is hidden that starts with a “.” — what a nightmare if your ssh server is configured with one of those.
-The sshd_server in Unix is configured by default to connect to port 22 and you must UN-comment the lines in the config file to get it to route to the new port.
-Unix comes configured with a firewall that will override your configuration changes if you try to connect to an sshd server on a new port number. You can flush all your firewall rules by using the “service iptables stop” command.
-Updating python from 2.6 to 2.7 is a process.
-Homebrew is awesome sauce.
Using terminal from my mac and performing all this work on a CentOS box in my DMZ. Im just not in the mood to run Django locally….
Why have one externally facing webserver when you can have two at twice the price?
Or none… thank you vmware…
🙂
Exercise for Engineers: Part 4
Strength Training
No matter what kind of exercise you like to do, no matter what your age or sex, it is extraordinarily beneficial for every person on the planet to partake in a some form of regular strength training. Boys and girls of junior high school age all the way up to senior citizens in their 90’s routinely participate in these kinds of weight-bearing exercises. The goals of each participant can vary widely from person to person, as there are many reasons to get involved. Lets review the basics of the benefit groups:
- Increased Muscle Mass:
This is the most common perception of the benefits of going to the gym and lifting heavy objects on a daily basis. Men ( and even some women ) go into the gym very average looking and come out a few years later with a dramatically changed physique. The process of working through consistently increasing loads of resistance against your muscle groups causes them to grow, expand and increase the level of strength present in the trained muscle groups. The level at which a given weight-lifter will benefit in this area is determined by age, genetics, training intensity and targetted accuracy.
- Increased Bone Density:As the core benefit of increasing your muscle mass takes effect, so does it have a complementary effect on the skeletal structure that supports the framework of your growing musculature. When your muscles increase in size from training, they are responding to an “irritation” by adapting themselves to a state that will be more prepared for the next time an “irritation” occurs. The same process happens to your bones as they are put under compressive and tensile loads from the weight lifting, and the response is to increase in mass, breadth and strength. The effect sharply increases your toughness and resistance to injury, especially in the case of fractures and bludgeoning impacts hard enough to break weaker bones.
- Improved Function Across All Body Systems:The other types of positive effects that weight training will have on your body are almost too numerous to count. The main ones that you will notice very quickly that happen to you are an improved metabolic rate, improved kidney, liver and digestive function, strengthening of the immune system, enhanced cardio-respiratory and circulatory functions, unconscious desire for quality dietary intake and an extraordinary improvement of mood and demeanor.
If I have sold everyone who reads this on running out and getting a gym membership today, or buying some piece of expensive home exercise equipment, then I have done well in transmitting this message, but strength training also presents its own daunting set of challenges. Here is what I recommend:
Make sure you are committed to a daily exercise regimen and are healthy enough for starting a training program unsupervised. I have lost count of how many of my friends read something and become overnight born-again gym fanatics only for them to lose interet the following week.
I highly recommend the gym option over working out at home. The gym is a social atmosphere of other like-minded fitness enthusiasts that will create extra motivation for you to go. They will always have a free 7 day trial that you can use to get your bearings before commiting to a multi-year membership contract. Finding a gym that is close to your home so it is easy to get to and from is crucial.
Spend some time becoming familiar with safe strength training practices. The need to warm up and use proper technique and body mechanics is absolutely necessary to prevent injury. On more than one occasion I have hurt my back and wrist by not strictly adhering to protocol. When starting a training program, I highly recommend splurging a little for some one-on-one time with a professional trainer. Most gyms will have someone on staff who does this a lot, but at the very least you will run into some kind of gym know-it-all who can provide some direction. You shouldn’t have to spend more than $100 to buy yourself enough time to learn the ropes.
Once you spend a few months in the gym having a good experience making friends, building muscle and getting into shape, you will be hooked. You will wonder why you never did this before and will kick yourself for not getting involved a lot sooner in life. Strength training is the best springboard you will ever find that will propel you into the vast spectrum of athletic ventures and activities that are out there in the world to experience.
Exercise for Engineers: Part 3
Stretching and Flexibility
Flexibility is a key component of any effective physical fitness program that must be imbedded into your consciousness from an early stage of your getting-into-fitness education. If it is not stressed and reinforced early, you will tend to pick up bad habits that will hamper your overall goals of turning your body into a well-oiled machine. In this section I will talk about why it is important, the mechanical semantics of stretching and how to incorporate it into your routines.
Having a good level of flexibility is kind of a misnomer as that is a generalization applied to a whole person when the real story is understanding it on a per muscle group basis. A given muscle group will have properties such as mass, strength, range of motion, density and flexibility, and they can be different for each muscle group. Since the body is in a constant state of adaptation, muscles do what they need to do, when they need to do it. You can have really poor flexibility but great strength in one muscle group, then the reverse for another. The key to increasing all of these factors is paying close attention to their flexibility, as it catalyses and fast-tracks the growth of every other area.
Why Stretch?
Stretching increases blood flow to the muscles and puts the fibers back in proper alignment. When engaged in a proper physical fitness regimen, a good stretching routine is necessary to keep pace with your body as it strengthens itself and drastically reduces the likelihood of injury.
What is flexibility?
To me, flexibility is made up of two sub-properties that I will call elasticity and range of motion.
GET myBody://anteriorDeltoid/flexibility/elasticity
GET myBody://anteriorDeltoid/flexibility/ROM
The elasticity of the muscle is a direct measure of its ability to be pulled across the two bone endpoints to which it is attached. It also illustrates your ability to resist injury from a sudden pulling impact upon the body that could cause a stain or a sprain. The springier and more elastic the muscle is, the stronger and more resilient it will be to injury.
Range of motion is pretty self explanatory as it defines the area in which a given joint can move around in. The greater your range of motion, the easier it is for you to move your body about and use it to apply leverage from a variety of positions. The neck is a good example for understanding range of motion for not only is it governed by the state and function of the Trapezius and Splenius muscles but it is also affected by the overall health of the vertebrae and spinal discs in your neck. (Understanding the subtleties of the spine is beyond the scope of this article, but I did want to give you a bit of a taste in understanding of how far down the rabbit hole these subjects can go.)
Try turning your head all the way to the left and right, then leaning it over from side to side and pay attention to how far you can go before it is uncomfortable and what it feels like. Keeping your neck flexible and strong can be the difference in living or living paralyzed in the case of an impact to the head that violently jars it to one side. If the spine snaps or otherwise suffers an electrical or synaptic disconnect as a result of the injury, you will probably not be able to use your body ever again. Your first line of defense ( after your helmet ) in resisting this type of injury will be measured by how strong and flexible your neck actually is. The greater these factors are, the greater your chances of surviving such a blow will be.
Muscle Stretching Theory:
When you stretch a muscle, there are two things you need to pay attention to:
- The positioning of your body relative to the muscle being stretched
- The involuntary response by the muscle being stretched
The positioning of your body in the way you do the stretch is crucial. Even the most subtle change in the mechanical posture executing the stretch can change the results drastically.
Let’s take the toe-touch stretch for example:
Reach down and try to touch your toes with your knees locked ( your thigh and calf are parallel and there is no bend to your knees when they are locked ). As you reach down and touch your toes, you will notice your general anxiety level begin to increase and your overall zest for life begin to disappear as you wonder why you are doing something so incredibly lame…
This is a compound stretch of the lower back, the calf, and quite awkwardly, the hamstring tendons where they connect to the back of the knee. I find this stretch quite unpleasant and nauseating and I just don’t do it a whole lot. Now, unlock your knees and put about a 10 degree bend in them and try the same type of movement again. You will feel a completely different stretch is taking place with just a slight adjustment to the angle of your knees. You have changed the stretch into a complete hamstring stretch which even gets a bit of your gluteus on the lower end. I do this stretch several times a week as it is a perfect complement for my weekly leg routines. What to learn here is that your form is the most important factor for making a given stretch effective.
The involuntary response of the muscle is a more advanced component of stretching, but learning it will allow you to hack your way into flexibility faster than someone who hasn’t.
Lean into a well formed stretch and hold it, giving it a nice, firm stretch. The pain and discomfort the muscle goes through is part of its tightening response when it experiences such a pull. When you stretch a muscle, it will tighten up in response to prevent itself from being torn apart or destroyed. ( Yeah! Muscles are smart like that! ) They know when drama is coming through the door they know just what to do in such an event.
Now hold that stretch for about 10 to 15 seconds and you will feel the muscle begin to relax and loosen up. This is the next response from the muscle as it senses that it is not in danger. When you feel the muscle relax, lean in a little bit more and take up the “slack” until it tightens up again in response. You will find that a coordination of your breathing along with this routine will augment the process as you do it. Timing your exhales in time with each lean in is rather effective and enhances your muscles ability to relax.
How To Stretch:
The movement of a body part in the execution of an exercise from start point to end point
(such as the bench press movement that starts out on your chest and ends when it is fully raised with your elbows locked out) defines the mechanical nature of a given stretch. If the exertion of a muscle in an exercise goes in one direction, then the stretch for that muscle is the same movement but in the opposite direction. When you see a guy in the gym with an arm on a wall and his elbow pointing directly behind him as he pushes gently on his hand, you are witnessing the stretch of the Pectoralis Major and minor. The effectiveness and targeting of his stretch depends on the angle of his elbow, the length of the stretch and his gauging of the involuntary response and his breathing during the stretch.
Since I will not be covering specific examples of all possible forms of stretching, I will guide you along the path that I took as a punk kid. My best suggestion to get going on a good stretching routine would be to join a martial arts class such as Kung Fu or Tae Kwon Do. They are good examples of fighting style arts that emphasize full range of motion movements in their kicks, stances and forms and the entire idea behind training your body to fight starts with 10-15 minutes of stretching. Spending a year under the instruction of a good teacher will be the best way to ingrain the art of stretching and flexibility into your physically fit subconscious.
Exercise for Engineers — Part 2
Three exercises to do every day.
In the enablement phase of your early training career, its very important that we are enfranchising ourselves to the true nature of physical fitness, and that means keeping it at the front of your attention each day. When making a sincere and honest effort to do just that, your day should be littered with exercise-laden events such as this that will help with this kind of integration. Below are three exercises that you can do each day, ( in succession ) that are easy to do at home and will provide you with rather dramatic results right away.
The Push-Up
Everybody say, “Oooooooooh! Push-ups!”
Pushups are the dreaded exercise of death that humiliated a lot of us in our high school PE classes, caused a lot of mental anguish for those of us who like to do things right and made many of us comfortable with the idea of cheating for the first time.
The reason this type of exercise is hard is because it forces us to interact with an exercise concept called our “Max”. I will touch more upon what this concept is in a later article, but for now just understand that in doing these types of calisthenics, your activity level will be hovering around the high end limit of exertion.
Push ups are a compound exercise that is performed using three separate muscle groups and is perfect for its portability because all you need is a smooth surface for your hands and gravity. The exertion uses your chest, your triceps and your deltoids to pull off the maneuver. Your hands should be about shoulder width apart, or slightly wider, depending on what feels more comfy for you. The movement mechanics of the exercise should have your elbows bending out at a right angle to the length of your body. Your back and body should be straight as your chest touches the ground at the bottom of the movement, pushing yourself all the way back up to complete one repetition of the exercise. Start out with a small number, like 10 or so, to get yourself used to it. What I try to do is add one every day. I’m up to 65.
The Sit-Up
Nobody knows how to do these. The way you were taught in grade school was no doubt flawed and you are probably inclined to add your quadriceps into the movement… no worries though…. We will break that habit right now.
Lay on the ground with your feet firmly affixed under something sturdy like a couch and make sure the floor is at least as soft as carpet. Place your hands up by your ears but do not grab onto your neck or use your arms in any sort of assistive pulling motion to get you off the ground. Curl your head and upper torso inward towards your gut until you are as curled in as you can get and do not bring your lower back off the ground. Then, return to your starting position with your shoulders touching the ground. This is one complete movement and should have all of the work done with the contracting “pull” of your abs. If you lift your lower back off the ground and bring your elbows to your knees, that’s great, but your missing the point of targeting your abs. Once you lift your lower back off the ground, it has become a compound exercise with your quadriceps doing most of the work. Do as many as you can with the strictest form possible and don’t stop until you feel your abs begin to burn.
The Pull-Up
Yowza! You want me to do what? Really?
Yes. Really. The pull-up is the bridging cornerstone exercise to the land of the uber-fit people. The barrier to entry of the pull up exercise is so difficult that most people go through their lives not even being able to do 1. You will be the saving grace of the planet if you help me reverse this trend.
The difficult reality of doing a pull-up is that you are almost guaranteed to be engaging your “Max” as you start out if you can only do one. If you can not do one, then a pull-up is well past your max and this makes getting stared next to impossible. However, you are reading my blog, and my blog is about figuring things out, so here are two ways you can surmount this problem:
The first solution requires a friend and they may not be routinely available on a daily basis and it is the more difficult option. Have your friend accompany you to your pull up bar and reach up and grab a hold. You should be off the ground at least a few inches and your hands should be slightly wider than shoulder width apart. Your palms should be facing away from you and your body should not swing around during the clean and swift upward motion as you pull your chin above the bar.
If you can not do one, this is where your friend comes into play. Cross your ankles on top of one another and bend your knees so your lower legs stick out, parallel to the ground. Your friend can assist your movement by taking a firm grasp of your bottom foot right at the curve of your ankle. During your pull up movement, your friend can “spot” you, lifting with you during your movement, paying careful attention to lift just enough of your weight to help you complete the repetition. The angle of your legs and leverage provided to you by your friend will allow you a perfect double spot from being able to use your hamstrings to press your lower legs downward against their hold on your ankles.
The second solution is more solitary and provides a much easier way to get to your goal, however, a gym with the proper exercise equipment is needed. I’m sure you are familiar with the “lat pull down machine”. This machine will provide you with the exact opposite movement of the same exercise which you can step down the weight of to any degree you specify. Work out with this machine routinely until you can pull down your own body weight. Then you are ready to start doing pull ups. 🙂